Version12.04.18
Dependencies: mbed
Fork of Micromouse_alpha_copy_copy by
Diff: Controller.h
- Revision:
- 1:d9e840c48b1e
- Parent:
- 0:a9fe4ef404bf
diff -r a9fe4ef404bf -r d9e840c48b1e Controller.h --- a/Controller.h Wed Mar 07 14:06:19 2018 +0000 +++ b/Controller.h Sat Mar 31 16:45:57 2018 +0000 @@ -16,6 +16,12 @@ virtual ~Controller(); void setDesiredSpeedLeft(float desiredSpeedLeft); void setDesiredSpeedRight(float desiredSpeedRight); + float getSpeedLeft(); + float getSpeedRight(); + float getIntegralLeft(); + float getIntegralRight(); + float getProportionalLeft(); + float getProportionalRight(); private: @@ -24,6 +30,8 @@ static const float LOWPASS_FILTER_FREQUENCY; static const float KN; static const float KP; + static const float KI; + static const float I_MAX; static const float MAX_VOLTAGE; static const float MIN_DUTY_CYCLE; static const float MAX_DUTY_CYCLE; @@ -40,8 +48,10 @@ float desiredSpeedRight; float actualSpeedLeft; float actualSpeedRight; + float iSumLeft; + float iSumRight; Ticker ticker; - + void run(); };