Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ROME2_P3 by
Diff: Controller.h
- Revision:
- 4:4428ede9beee
- Parent:
- 1:31b1c5cefd64
--- a/Controller.h Fri Mar 16 19:44:20 2018 +0000 +++ b/Controller.h Thu Apr 12 12:19:19 2018 +0000 @@ -27,10 +27,19 @@ void setRotationalVelocity(float velocity); float getActualTranslationalVelocity(); float getActualRotationalVelocity(); + void setX(float x); + float getX(); + void setY(float y); + float getY(); + void setAlpha(float alpha); + float getAlpha(); private: static const float PERIOD; + static const float PI; + static const float WHEEL_DISTANCE; + static const float WHEEL_RADIUS; static const float COUNTS_PER_TURN; static const float LOWPASS_FILTER_FREQUENCY; static const float KN; @@ -38,9 +47,6 @@ static const float MAX_VOLTAGE; static const float MIN_DUTY_CYCLE; static const float MAX_DUTY_CYCLE; - static const float PI; // the constant PI - static const float WHEEL_DISTANCE; // distance between wheels, given in [m] - static const float WHEEL_RADIUS; // radius of wheels, given in [m] PwmOut& pwmLeft; PwmOut& pwmRight; @@ -60,6 +66,9 @@ float desiredSpeedRight; float actualSpeedLeft; float actualSpeedRight; + float x; + float y; + float alpha; Ticker ticker; void run(); @@ -67,3 +76,4 @@ #endif /* CONTROLLER_H_ */ +