We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c2ab4c commit aedc8c8Copy full SHA for aedc8c8
libraries/PIDEasy/src/PIDEasy.h
@@ -0,0 +1,24 @@
1
+#ifndef PIDEASY_H
2
+#define PIDEASY_H
3
+
4
+class PID {
5
+ public:
6
+ PID(float kp, float ki, float kd);
7
8
+ float compute(float error, unsigned long dt);
9
+ void setWindUP(float min, float max);
10
+ void setConstrain(int min, int max);
11
+ void setSmoothingDerivate(float sD);
12
+ void setDampingFactor(float dF);
13
14
+ private:
15
+ float kp, ki, kd;
16
+ float previous_error;
17
+ float previous_derivative;
18
+ float integral;
19
+ float min_windup, max_windup;
20
+ float derivative_smoothing, dampingFactor;
21
+ int min_constrain, max_constrain;
22
+};
23
24
+#endif
0 commit comments