View Single Post
  #5   Spotlight this post!  
Unread 19-02-2006, 21:51
TimeOut's Avatar
TimeOut TimeOut is offline
Registered User
AKA: Sean Kelly
FRC #0499 (The Toltechs)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: San Antonio, TX
Posts: 50
TimeOut is on a distinguished road
Re: Sending variables to Auto Mode

Try this:

instead of of doing:
position = Process_Data_From_Master_uP();

do this:
if (!autonomous_mode) {
position = get_auto_mode();
}

The write a new function that all it does is return the position of the switch. We put ours in a seperate file that is just the TOLTECH's code.

During the disable and user modes you want the position to be updated. I'm not 100% sure how the game masters will transition to Autonomous. If they switch to autonomous BEFORE the loop hits the position assignment, then you'll get a 0 (or whatever you default case is). This solved the problem for us.

Sean

Quote:
Originally Posted by jgannon
Yes. The last values from the OI before autonomous starts, even when disabled, are available to you in autonomous mode.