In the code there is already an alias defined to see if you are in autonomous mode called "auton_mode" . It is bit 6 of the PBmode variable.
There is an example of how to code for this in the Programming Reference Guide, which can be found in the documents section at
Innovation First's web site The example is written as
If auton_mode = 1 then do_autonomous_stuff
'Normal drive code
goto end_of_autonomous
do_autonomous_stuff:
'Autonomous mode code
end_of_autonomous:
The Programming Reference Guide is well done. It will be a big help to new PBasic programmers.
As one of the coaches of the control team I am really looking forward to developing the autonomous mode code. Of course I say this now, talk to me in six weeks.