View Single Post
  #15   Spotlight this post!  
Unread 03-26-2003, 09:19 AM
Unsung FIRST Hero
Nate Smith Nate Smith is offline
FRC Key Volunteer Trainer
AKA: CrazyNate
no team
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Old Town, Maine
Posts: 1,029
Nate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to behold
Send a message via AIM to Nate Smith Send a message via Yahoo to Nate Smith
Quote:
Originally posted by Jnadke
When comp_mode is 0, your robot is active. Basically, make your if statements to read:

If auton_mode = 0 or comp_mode = 1 or rc_sw14 = 0 then skip_Blah
After the initial powerup sequence on the field causing problems with some autonomous programs, FIRST has switched the bit toggle sequence to(If i understood what Eric told me correctly):

Pre Match: auton_mode = 0, comp_mode = 1
Human Player Phase: auton_mode = 1, comp_mode = 1
Autonomous Phase: auton_mode = 1, comp_mode = 0
Remote Control Phase: auton_mode = 0, comp_mode = 0
Post Match: auton_mode = 0, comp_mode = 1

So, what I'm going to recommend is that your code only starts running in autonomous if BOTH auton_mode and comp_mode are in the states described above. As an FYI, FIRST changed this after realizing that with the original field control code, it was possible for one or two program loops at match start that the PBASIC program would think that it was in user control mode, and possibly skip over the auton program entirely(see other threads on this).
__________________
Nate Smith
nsmith@smythsoft.com
12 seasons, 4 teams, and more time logged behind the scorekeeper's table than I care to remember...
returning for 2011? only time will tell...