Cristi Stoican / Mbed 2 deprecated Migration

Dependencies:   BLE_API mbed nRF51822

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers PIDController.hpp Source File

PIDController.hpp

00001 #ifndef PIDCONTROLLER_H
00002 #define PIDCONTROLLER_H
00003 
00004 #include "Controller.hpp"
00005 #include "ControllerParams.hpp"
00006 
00007 #define TE      0.1
00008 #define dif(a,b)    (a-b)
00009 
00010 class PIDController : public Controller {
00011 
00012     private:
00013         float kp;
00014         float ti;
00015         float td;
00016     
00017     public:
00018     
00019         virtual void updateParams(ControllerParams&);   
00020         virtual float calculateCmd(void) const;
00021         virtual ~PIDController();
00022 
00023         void setKp(float);
00024         float getKp() const;
00025         
00026         void setTi(float);
00027         float getTi() const;
00028     
00029         void setTd(float);
00030         float getTd() const;        
00031 };
00032 
00033 #endif