![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
my new gear...
pid.hpp@0:1456b6f84c75, 2022-02-25 (annotated)
- Committer:
- yootee
- Date:
- Fri Feb 25 05:20:11 2022 +0000
- Revision:
- 0:1456b6f84c75
my_custom
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yootee | 0:1456b6f84c75 | 1 | #ifndef PID_H |
yootee | 0:1456b6f84c75 | 2 | #define PID_H |
yootee | 0:1456b6f84c75 | 3 | #include"mbed.h" |
yootee | 0:1456b6f84c75 | 4 | |
yootee | 0:1456b6f84c75 | 5 | class Pid{ |
yootee | 0:1456b6f84c75 | 6 | public: |
yootee | 0:1456b6f84c75 | 7 | Pid(double get_Kp,double get_Ki,double get_Kd,int plumi); |
yootee | 0:1456b6f84c75 | 8 | double returnVal(double get_target,double input_val,double time); |
yootee | 0:1456b6f84c75 | 9 | void setGain(double get_Kp,double get_Ki,double get_Kd); |
yootee | 0:1456b6f84c75 | 10 | void setMax(double get_max,double get_min); |
yootee | 0:1456b6f84c75 | 11 | private: |
yootee | 0:1456b6f84c75 | 12 | double max_val; |
yootee | 0:1456b6f84c75 | 13 | double minimum_val; |
yootee | 0:1456b6f84c75 | 14 | double Kp; |
yootee | 0:1456b6f84c75 | 15 | double Ki; |
yootee | 0:1456b6f84c75 | 16 | double Kd; |
yootee | 0:1456b6f84c75 | 17 | double e_o; |
yootee | 0:1456b6f84c75 | 18 | double e_c; |
yootee | 0:1456b6f84c75 | 19 | double Operation_amount; |
yootee | 0:1456b6f84c75 | 20 | double target; |
yootee | 0:1456b6f84c75 | 21 | double Give_P; |
yootee | 0:1456b6f84c75 | 22 | double Give_I; |
yootee | 0:1456b6f84c75 | 23 | double Give_D; |
yootee | 0:1456b6f84c75 | 24 | double plusminus; |
yootee | 0:1456b6f84c75 | 25 | }; |
yootee | 0:1456b6f84c75 | 26 | |
yootee | 0:1456b6f84c75 | 27 | #endif |