We just had a competition today. We had eight qualification matches. (28 teams) We only have an intake/extake + a roller mechanism. Our autonomous code worked for the first 4 matches, but then it didn’t work for the next 3. For some reason, it seemed like it would start the code halfway through because the robot did nothing for the first half but then continued from a point in the code. (The second image.) We also re-downloaded the code, but it didn’t fix the problem. Our mentor told us to reset everything, and it worked for the last qualification match. (Brain, controller, re-download code) The same thing happened with our programming skills, and it started working from the same point and did the extra stuff. (Our programming skills is our autonomous code + the robot alining for 4 tiles.) Does anybody else have the same problem?
Code:

Note: We didn’t test it without resetting everything because when it malfunctioned, it made us go over the autonomous line, losing the bonus, and we were in the qualification matches.
Note: We have many, long waits because the functions are all “and don’t wait”.