Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: ActiveCaster_ ActiveCaster_2
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
Generated on Tue Aug 30 2022 15:49:49 by
1.7.2