Team repo

Dependencies:   mbed QEI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pid.h Source File

pid.h

00001 #ifndef _PID_H_
00002 #define _PID_H_
00003 
00004 class PIDImpl;
00005 class PID
00006 {
00007     public:
00008         PID(float dt, float max, float min, float kp, float ki, float kd );
00009         ~PID();
00010         float calculate( float setpoint, float pv );
00011         void testError(float setpoint, float pv);
00012 
00013     private:
00014         float dt_;
00015         float max_;
00016         float min_;
00017         float kp_;
00018         float ki_;
00019         float kd_;
00020         float pre_error_;
00021         float integral_;
00022 };
00023 
00024 #endif