bugfixing
This commit is contained in:
@@ -63,8 +63,8 @@ double user_pid_ctrl( struct MotorData *Mptr)
|
||||
Mptr->Servo.Integrator+=Mptr->PosError*Mptr->Servo.Ki; // I term
|
||||
ctrl_out+=Mptr->Servo.Integrator;
|
||||
// Combine
|
||||
if (ctrl_out>150)ctrl_out=150;
|
||||
if (ctrl_out<-150)ctrl_out=-150;
|
||||
if (ctrl_out>2000)ctrl_out=2000;
|
||||
if (ctrl_out<-2000)ctrl_out=-2000;
|
||||
return ctrl_out;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user