All of the autonomous code is in a file called robot.c, if you really want to understand it, you need to read pid.c, gyro.c, encoder.c and their espective headers. The script that runs tha code is in commands.h. If you want a more detialed discussion of the script, i posted something about it
here. I hope to fix the grammer later since I am falling asleep at the keyborad right now.
Hope this helps.
-Tony K