bugfixing

This commit is contained in:
2017-01-19 13:40:04 +01:00
parent 3519c559a1
commit df42fa49b3
10 changed files with 129 additions and 51 deletions

View File

@@ -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 {