|
Re: Simulating autonomous mode - i need help!! :(
Rather than directly manipulating that variable (can be dangerous* if you forget to remove the code), what we did last year was something like this:
if(autonomous_mode || p3_sw_trig)
This way, it would still work normally in competition, and if we had a joystick connected to port 3, we could trigger it at will.
*The reason this is dangerous is simply if you lock autonomous_mode to 1 then forget to remove it later (it can happen, trust me), your team will be angry at you because your robot never left autonomous mode. Likewise, if you hardcode it to 0, then your team will be angry because your autonomous mode never worked. The or I propose here allows you to simply attach a joystick to port 3. Once you're done, just put tape on port 3 saying "programmers only" so that no-one triggers it by accident.
The ideal way to do this is to make a competition port. However, I know very few details about how to do that, so someone will have to post details on that.
|