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.
Diff: shared/MD_PID/MD_PID.h
- Revision:
- 0:ee7e9405e1c7
diff -r 000000000000 -r ee7e9405e1c7 shared/MD_PID/MD_PID.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/shared/MD_PID/MD_PID.h Wed Apr 14 07:26:19 2021 +0000
@@ -0,0 +1,33 @@
+#ifndef MD_PID_H_
+#define MD_PID_H_
+
+#include <shared/MD/MD.h>
+#include <shared/QEI/QEI.h>
+#include "PID.h"
+#include "PPID.h"
+#include "PI_D.h"
+
+class MD_PID
+{
+public:
+ MD_PID( MD *md, QEI *qei,
+ double k = 0, double ti = 0, double td = 0,
+ double max_speed = 0);
+ virtual void drive(double target, double interval);
+ virtual void brake(double target);
+ virtual void free();
+ void set_max_speed(double max_speed);
+
+ double get_duty();
+
+private:
+ MD *_md;
+ QEI *_qei;
+ PID *_pid;
+ double _duty;
+ double _max_speed;
+
+ double read_vel();
+};
+
+#endif