Template for group 4
Dependencies: mbed
Fork of RT2_P3_students_G4 by
Diff: PI_Cntrl.h
- Revision:
- 11:67af6d24c588
- Parent:
- 6:8ed679044a72
diff -r 85840c065e00 -r 67af6d24c588 PI_Cntrl.h --- a/PI_Cntrl.h Fri Apr 27 06:34:29 2018 +0000 +++ b/PI_Cntrl.h Fri Apr 27 06:54:18 2018 +0000 @@ -6,29 +6,9 @@ { public: - PI_Cntrl(float Kp, float Tn, float Ts); - PI_Cntrl(float Kp, float Tn, float Ts, float uMax); - PI_Cntrl(float Kp, float Tn, float Ts, float uMax, float uMin); - - float operator()(float error) { - return doStep((double)error); - } - - virtual ~PI_Cntrl(); - - void reset(float initValue); - float doStep(double error); private: - double b0; - double b1; - double b2; - double s; - double uMax; - double uMin; - - void setCoefficients(float Kp, float Tn, float Ts); };