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.
Dependencies: mbed QEI biquadFilter
PID_controller.h@0:494acf21d3bc, 2016-10-31 (annotated)
- Committer:
- ronvbree
- Date:
- Mon Oct 31 13:05:53 2016 +0000
- Revision:
- 0:494acf21d3bc
test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ronvbree | 0:494acf21d3bc | 1 | |
ronvbree | 0:494acf21d3bc | 2 | class PIDController { |
ronvbree | 0:494acf21d3bc | 3 | private: |
ronvbree | 0:494acf21d3bc | 4 | float Kp; |
ronvbree | 0:494acf21d3bc | 5 | float Ki; |
ronvbree | 0:494acf21d3bc | 6 | float Kd; |
ronvbree | 0:494acf21d3bc | 7 | float previousError; |
ronvbree | 0:494acf21d3bc | 8 | float errorIntegral; |
ronvbree | 0:494acf21d3bc | 9 | public: |
ronvbree | 0:494acf21d3bc | 10 | PIDController(float Kp, float Ki, float Kd); |
ronvbree | 0:494acf21d3bc | 11 | float control(float error, float t); |
ronvbree | 0:494acf21d3bc | 12 | |
ronvbree | 0:494acf21d3bc | 13 | }; |