View Single Post
  #9   Spotlight this post!  
Unread 27-02-2013, 09:21
DjScribbles DjScribbles is offline
Programming Mentor
AKA: Joe S
FRC #2474 (Team Excel)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2012
Location: Niles MI
Posts: 284
DjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to behold
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.
Reply With Quote