diff --git a/PID_v1/PID_v1.cpp b/PID_v1/PID_v1.cpp index 6c95895..8e71ded 100644 --- a/PID_v1/PID_v1.cpp +++ b/PID_v1/PID_v1.cpp @@ -60,7 +60,7 @@ bool PID::Compute() double dInput = (input - lastInput); /*Compute PID Output*/ - double output = kp * error + ITerm- kd * dInput; + double output = kp * error + ITerm + kd * dInput; if(output > outMax) output = outMax; else if(output < outMin) output = outMin;