Kobayashi Akihiro / ActiveCaster

Dependents:   ActiveCaster_ ActiveCaster_2

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers PIDclass.h Source File

PIDclass.h

00001 #ifndef PIDCLASS_h
00002 #define PIDCLASS_h
00003 
00004 #include "mbed.h"
00005 
00006 class PID
00007 {
00008 public:
00009     PID(float xKp, float xKi, float xKd, float xint_time);
00010     float getCmd(float ref, float act, float maxcmd);
00011     void PIDinit(float ref, float act);
00012     void setPara(float xKp, float xKi, float xKd);
00013 
00014 private:
00015     float preError;
00016     float intError;
00017     float Kp;
00018     float Ki;
00019     float Kd;
00020     float int_time;
00021     
00022     bool init_done;
00023     
00024 };
00025 
00026 #endif