|
You should cycle the robot power before starting an autonomous mode match. This way you will be sure all of you variables (flags, states, etc.) are reset to their default state.
If you do not, the processor is still running in your main loop after the match. When the competion controller disables the robot, it disables the inputs and the outputs but does not force a controller reset. When re-enabled, the controller picks up where it left off.
When the second match starts, the processor continues to run but the initialization section is not executed thus any variables remain at the same value as at the end of the previous match.
The effect can be:
Let's say your dead reckoning code has a timeout so your robot doesn't run after it knocks over the boxes. You use that value to stop the motors. When you start the next match, that variable has not been reset and your code will think it is still at the end of the previous autonomous mode session.
By doing a power off and power on (POPO)before the match, you are assured of a proper controller reset and thus the initialization code will be executed properly.
We had this happen in our first practice round in the regional and didn't have a problem since doing to "POPO".
|