So, my problem is basically this one, when my code is already built in the C-Rio, upon activation of this code through the Driver Station (be practice mode or in the competitions), my autonomous doesn't run on the first time. It only does run after the third or fourth try, in which I have to wait 8 seconds before pressing enable on the Driver Station again. However, this solution wasn't an option in the competitions, as your robot must enter the arena turned off, leaving you without the possibility to run the code 3 or 4 times before the match. My possible explanation for this problem is that the C-Rio hasn't loaded the autonomous code yet, but it can be anything else. Any ideas as to what may solve my problem?
Thanks for taking your time reading my problem
Edit: Added the code, for the autonomous, you also need to check the global variables and Periodic Tasks VI's.