Autonomous Mode

How many times is User_Autonomous_Code called? (Please say only once :ahh: )

Look in main.c. It’s called every time that (statusflag.NEW_SPI_DATA) is set and autonomous mode is active (i.e. nominally every 26.2 milliseconds).

Well, actually, if you look in user_routines_fast.c, you will see “while(autonomous_mode)”. This means that it will only call User_Autonomous_Code() once, and will keep looping until you disable autonomous.

I stand corrected.

It is possible, however, for the robot to go back into autonomous mode after leaving it. This will never happen in a match, but could if you are using a dongle on the competition port.

What is this “dongle” you speak of?

A dongle is a little switch that connects to your OI’s competition port and lets you change between disabled, autonomous and user controlled mode. It’s used for testing and is fairly easy to build, however AndyMark also sells one for $30.

Make sure reset counters and flags when you come out of autonomous for any reason. So many false starts last year forced teams to have to run out on the field to reset their robots in order to reset their automonous routines.

BC

Alright