Update PID_v1.cpp
output = kp * error + ki*sumerror + kd * dInput;
This commit is contained in:
parent
d21d7e3d09
commit
ddd27a8704
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user