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 Versuch20 by
Diff: Classes/Controller.h
- Revision:
- 5:64d7b4b69fdf
- Parent:
- 0:b886f13e4ac6
--- a/Classes/Controller.h Tue May 01 11:42:38 2018 +0000
+++ b/Classes/Controller.h Sat May 12 12:49:18 2018 +0000
@@ -16,16 +16,23 @@
virtual ~Controller();
void setDesiredSpeedLeft(float desiredSpeedLeft);
void setDesiredSpeedRight(float desiredSpeedRight);
- static const float COUNTS_PER_TURN;
void resetCounter();
+ float getSpeedLeft();
+ float getSpeedRight();
+ float getIntegralLeft();
+ float getIntegralRight();
+ float getProportionalLeft();
+ float getProportionalRight();
private:
static const float PERIOD;
-
+ static const float COUNTS_PER_TURN;
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;
@@ -42,6 +49,8 @@
float desiredSpeedRight;
float actualSpeedLeft;
float actualSpeedRight;
+ float iSumLeft;
+ float iSumRight;
Ticker ticker;
void run();
@@ -54,5 +63,3 @@
-
-
