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.
Dependencies: LSM9DS1 RangeFinder FastPWM
Dependents: PM2_Example_PES_board PM2_Example_PES_board PM2_Example_PES_board PM2_Example_PES_board ... more
Diff: SpeedController.h
- Revision:
- 10:fe74e8909d3f
- Parent:
- 6:41dd03654c44
- Child:
- 29:335fb9b01ca7
diff -r 583dbd17e0ba -r fe74e8909d3f SpeedController.h
--- a/SpeedController.h Tue Aug 31 15:38:44 2021 +0000
+++ b/SpeedController.h Thu Feb 10 12:04:36 2022 +0000
@@ -12,17 +12,19 @@
public:
SpeedController(float counts_per_turn, float kn, float max_voltage, FastPWM& pwm, EncoderCounter& encoderCounter);
- SpeedController(float counts_per_turn, float kn, float kp, float max_voltage, FastPWM& pwm, EncoderCounter& encoderCounter);
virtual ~SpeedController();
- void setDesiredSpeedRPM(float desiredSpeed);
- float getSpeedRPM();
void setDesiredSpeedRPS(float desiredSpeed);
float getSpeedRPS();
+ float getSpeedRPM();
+ void setFeedForwardGain(float kn);
+ void setSpeedCntrlGain(float kp);
private:
+ void setDesiredSpeedRPM(float desiredSpeed);
+
static const float TS;
static const float LOWPASS_FILTER_FREQUENCY;
static const float MIN_DUTY_CYCLE;
