kevin eccli
/
Freescale_CupV4
Adaptation K22F
Pid.h
- Committer:
- singularity
- Date:
- 2014-12-16
- Revision:
- 0:6004a7230f87
File content as of revision 0:6004a7230f87:
#ifndef _PID_H #define _PID_H #include "mbed.h" struct Erreur { float p; float i; float d; }; class Pid { public: Pid(); Pid(float Kp, float Ki, float Kd); void setKp(float Kp); void setKi(float Ki); void setKd(float Kd); float getCommande(float p_erreur, float i_erreur, float d_erreur); float getCommande(Erreur e); private: float kp; float ki; float kd; }; #endif