Proportional, integral, derivative controller library. Ported from the Arduino PID library by Brett Beauregard.
Fork of PID by
Diff: PID.h
- Revision:
- 1:c67f4f763c45
- Parent:
- 0:6e12a3e5af19
--- a/PID.h Thu Sep 02 16:48:10 2010 +0000 +++ b/PID.h Tue Aug 11 13:05:25 2015 +0000 @@ -105,6 +105,13 @@ */ void setTunings(float Kc, float tauI, float tauD); + /** + * id == 1: tuning P parameter + * id == 2: tuning I parameter + * id == 3: tuning D parameter + */ + void setTunings(int id, float data); + /** * Reinitializes controller internals. Automatically * called on a manual to auto transition. @@ -198,6 +205,8 @@ float outSpan_; //The accumulated error, i.e. integral. + int accPosition; + float accErrorArray[50]; float accError_; //The controller output bias. float bias_;