SmartWheels self-driving race car. Designed for NXP Cup. Uses FRDM-KL25Z, area-scan camera, and simple image processing to detect and navigate any NXP spec track.
Dependencies: TSI USBDevice mbed-dev
Fork of SmartWheels by
Diff: main.cpp
- Revision:
- 61:bdc31e4fa3c4
- Parent:
- 58:996effac29b9
- Child:
- 67:1b5c8add3d01
diff -r 4e53879e1129 -r bdc31e4fa3c4 main.cpp --- a/main.cpp Sat Apr 08 17:59:27 2017 +0000 +++ b/main.cpp Thu Apr 13 17:52:26 2017 +0000 @@ -111,11 +111,11 @@ if(totalAngleDegrees > lastAngle) { - cornerRatio = (lastAngle / totalAngleDegrees); + cornerRatio = cornerRatio * (LasstAngle / totalAngleDegrees); } else if(totalAngleDegrees < lastAngle) { - cornerRatio = (lastAngle / totalAngleDegrees); + cornerRatio = cornerRatio * (lastAngle / totalAngleDegrees); } else {