|
Re: methods for Switchable Autonomous Modes
To add one more alternative method to the mix, I typically monitor the joystick buttons during disabled mode, if a pair of buttons gets held for 2 seconds, I change the autonomous mode variable.
When the robot goes into autonomous, I have a switch case that calls the different routines based on the autonomous mode variable.
It has the disadvantage that it doesn't persist through reset, so if you restart the match or reboot the robot it needs to be set back to the mode you want. It works well if you use the same mode 90% of the time, and have other modes for flexibility. The advantage is that you don't need any hardware, the implementation is entirely in the robot code.
|