This is a copy of the Reference Standard PID controller ala controlguru.com
Fork of PID by
Diff: PID.cpp
- Revision:
- 1:117e0c36eb22
- Parent:
- 0:d58c1b8d63d9
- Child:
- 2:55bf0f813bb4
diff -r d58c1b8d63d9 -r 117e0c36eb22 PID.cpp --- a/PID.cpp Wed Feb 26 08:46:04 2014 +0000 +++ b/PID.cpp Mon Jan 25 22:29:38 2016 +0000 @@ -1,13 +1,12 @@ /** * Includes */ -#include "stdafx.h" #include "PID.h" PID::PID(float Kc, float tauI, float tauD, float interval) { usingFeedForward = false; - //inAuto = false; + inAuto = false; //Default the limits to the full range of I/O. //Make sure to set these to more appropriate limits for your application. @@ -135,7 +134,7 @@ accError_ = 0; } -/* + void PID::setMode(int mode) { //We were in manual, and we just got set to auto. @@ -146,7 +145,7 @@ inAuto = (mode != 0); -}*/ +} void PID::setInterval(float interval) { @@ -159,7 +158,7 @@ } } -/* + void PID::setSetPoint(float sp) { setPoint_ = sp; @@ -171,7 +170,7 @@ processVariable_ = pv; } -*/ + void PID::setBias(float bias){ bias_ = bias;