Competition Switch Not Working

We are unable to switch between the tasks, and don’t know the problem. We have tried everything we can think of and are currently splitting the code up into sections to test if one part is causing the problem.

(I know I can simplify the code with creating functions but that is a whole other problem, and the autonomous is not done. Also there is more code i just removed it to fit in the character limit)

please help -7035M
pragma config.docx (17.4 KB)

You have an infinite loop in your pre_auton code that runs after you have made a selection. pre_auton must return otherwise the competition code will not run. The loops starts at line 257 and displays battery voltage etc.

while(true) // An infinite loop to keep the program running until you terminate it

you need to find an alternative way of running this code, perhaps move it into a function (or new task) and call when necessary.