1
Fork 0

integral windup limit

This commit is contained in:
Andy Killorin 2024-10-24 13:03:12 -04:00
parent be7060bc16
commit d1ee6baccf
Signed by: ank
GPG key ID: 23F9463ECB67FE8C

View file

@ -125,6 +125,11 @@ protected:
sumError += error;
float maxSumError = maxEffort/Ki;
sumError = max(sumError, -maxSumError);
sumError = min(sumError, maxSumError);
float errorDiff = error - prevError;
prevError = error;