PID motor controll for the biorobotics project.

Dependencies:   FastPWM QEI

Dependents:   PID_example Motor_calibration Demo_mode Demo_mode ... more

Revision:
4:5353c5d0d2ed
Parent:
3:f1067b5bb5af
--- a/pid.h	Mon Oct 29 15:27:56 2018 +0000
+++ b/pid.h	Wed Oct 31 06:13:15 2018 +0000
@@ -16,8 +16,12 @@
     PID();
     void set_period(double period);
     void set_k_values(double Kp, double Ki, double Kd);
+    // Sets the error memory to 0.
+    // Leaves the K values intact.
+    void clear_state();
     
     double update(double error);
-    
+
+private:
     double biquad_step(double x);
 };
\ No newline at end of file