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.
pid.h@2:d7cd4deef7be, 2015-12-15 (annotated)
- Committer:
- BAC
- Date:
- Tue Dec 15 02:42:41 2015 +0000
- Revision:
- 2:d7cd4deef7be
- Parent:
- 0:f15aa1706e16
the newest
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| BAC | 0:f15aa1706e16 | 1 | #include "mbed.h" | 
| BAC | 0:f15aa1706e16 | 2 | |
| BAC | 0:f15aa1706e16 | 3 | class PIDcontroller{ | 
| BAC | 0:f15aa1706e16 | 4 | private: | 
| BAC | 0:f15aa1706e16 | 5 | float Kp,Ki,Kd; | 
| BAC | 0:f15aa1706e16 | 6 | float Err,Err_old,Err_accum,FB; | 
| BAC | 0:f15aa1706e16 | 7 | float DT; | 
| BAC | 0:f15aa1706e16 | 8 | |
| BAC | 0:f15aa1706e16 | 9 | public: | 
| BAC | 0:f15aa1706e16 | 10 | |
| BAC | 0:f15aa1706e16 | 11 | PIDcontroller(float kp, float ki, float kd, float dt); | 
| BAC | 0:f15aa1706e16 | 12 | void PID(float err); | 
| BAC | 0:f15aa1706e16 | 13 | float GetFB(void); | 
| BAC | 0:f15aa1706e16 | 14 | }; |