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:
- 29:335fb9b01ca7
- Parent:
- 10:fe74e8909d3f
--- a/SpeedController.h Thu May 05 11:10:12 2022 +0000
+++ b/SpeedController.h Fri May 13 20:53:33 2022 +0000
@@ -6,6 +6,7 @@
#include "LowpassFilter.h"
#include "ThreadFlag.h"
#include "FastPWM.h"
+#include "Motion.h"
class SpeedController
{
@@ -20,6 +21,10 @@
float getSpeedRPM();
void setFeedForwardGain(float kn);
void setSpeedCntrlGain(float kp);
+ void setMaxVelocityRPS(float maxVelocityRPS);
+ void setMaxVelocityRPM(float maxVelocityRPM);
+ void setMaxAccelerationRPS(float maxAccelerationRPS);
+ void setMaxAccelerationRPM(float maxAccelerationRPM);
private:
@@ -42,6 +47,8 @@
float desiredSpeed;
float actualSpeed;
// float actualAngle;
+
+ Motion motion;
ThreadFlag threadFlag;
Thread thread;
