So I have created my code for autonomous so far and it works very consistently. But right after the code is done the autonomous program runs again somehow. What could cause this issue?!
Could you please copy the whole code file into a reply. We can’t see all of the project and some of the hidden stuff is important to autonomous functionality. It’s also easier to read and debug when its text.
Untitled document.pdf (44.2 KB)
This is the whole code in PDF format. The autonomous program runs twice but I just want it to run once. It basically just loops again.
looks like you run “ScreenPressed” for two different things. Once when the actual screen is pressed and again when the autonomous part of the match is enabled.
This may not be the root cause of the auton sequence running twice (it all depends on how you are triggering autonomous) but you should really separate the auton selection from the function that runs the code.
How would I go about separating my autonomous selector?
I actually deleted my previous code and then re-wrote my code again and the autonomous only runs one time now as I intended. So I guess problem solved!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.