29/10/2019
Dependencies: Encoder_Nucleo_16_bits
Diff: PID.cpp
- Revision:
- 12:13f42fe66fb1
- Parent:
- 8:4553677e8b99
- Child:
- 13:0227a21c181a
--- a/PID.cpp Thu Oct 24 13:20:07 2019 +0000 +++ b/PID.cpp Fri Oct 25 08:05:11 2019 +0000 @@ -152,7 +152,7 @@ deltaX = meanDist * cos (_THETA); deltaY = meanDist * sin (_THETA); - deltaTheta = diffDist / 230; + deltaTheta = atan2(diffDist,230.0); _X += deltaX; _Y += deltaY;