Update number 11 has the bit sequence of comp_mode and auton_mode for the match. Its supposed to go like this:
Before the match: comp_mode = 1, auton_mode = 0
Autonomous: comp_mode = 0, auton_mode = 1
Teleoperation: comp_mode = 0, auton_mode = 0
After the match: comp_mode = 1, auton_mode = 0
We have a thumbwheel switch on the OI to select the autonomous program, so its important to make sure we grab the value before autonomous starts or it will be overridden to 0. We wrote the initialization program with the following conditions:
Code:
IF comp_mode = 0 AND auton_mode = 0 THEN RUN 1
IF comp_mode = 0 AND auton_mode = 1 THEN
SELECT ProgramNumber
CASE 0
RUN 2
CASE 1
RUN 3
CASE 2
RUN 4
ENDSELECT
ENDIF
Slot 1 holds the teleoperation code and slots 2 - 5 hold autonomous programs. During testing with the dongle it worked fine, but on the field it kept running slot 1. We didn't realize right away what was wrong, but you cannot depend on the bits flipping in the order they tell you. I think they drop comp_mode low before raising auton_mode, which is what messed us up. Its fixed now, but it was very frustrating.