Autonomous PID Command won't restart after use

Hello, I’m trying to figure out a bug in our code in which our Autonomous turnToAngle() command won’t restart after a single. The command uses a PIDController in the form of a PIDCommand. After a single use, I can’t seem to make the Autonomous sequence work again. I’ve tried powercycling and repushing code, but the conditions to the command work are beyond me.

The robot is set on a cart to prevent it from moving, and can be freely pushed to get accurate readings from the Gyro. Could it be that the PID does not get enough updates from the Gyro to exit the loop prematurely?

I’ve been following the sample command from WPI, but it does not solve my problem.

Here is a link to my code.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.