Robot continuously turning when code specifies certain degree


We have a PD, and apart from the turning it works fine. Whenever I specify a certain degree for it to turn to, it just keeps going regardless of the degree. When the number is small, like 2 or 3, the robot moves a tiny bit. I’m not sure what is causing this, or how to fix it. I attached the code to be viewed.


10-8-21(3).zip (33.0 KB)

I think you’ll have to make a separate pd loop for turning