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).