David's line following code from the LVBots competition, 2015.
Dependencies: GeneralDebouncer Pacer PololuEncoder mbed
Fork of DeadReckoning by
Diff: reckoner.h
- Revision:
- 46:f11cb4f93aac
- Parent:
- 36:ccb03b734737
--- a/reckoner.h Wed Apr 15 19:19:19 2015 +0000 +++ b/reckoner.h Wed Apr 15 21:19:22 2015 +0000 @@ -10,7 +10,7 @@ // the current position of the robot. // cos corresponds to the x component of the orientation vector. // sin corresponds to the y component of the orientation vector. - int32_t cos, sin; + int32_t cosv, sinv; // Together, x and y are a vector that points from the starting point to the // robot's current position. @@ -29,4 +29,5 @@ void handleRight(); void handleLeft(); void handleTurnRadians(int32_t radians); + void setTurnAngle(int32_t angle); };