Fixed bug in motor windup calculation

This commit is contained in:
Stedd 2023-10-22 12:04:25 +02:00
parent 26955c1c12
commit 800fb1876e
2 changed files with 1 additions and 1 deletions

Binary file not shown.

View File

@ -169,7 +169,7 @@ float motorControl(byte motorID, int speedCMD_, int saturation, float dbPos_, fl
windup = saturation - speedCMD_;
speedCMD_ = saturation;
} else if (speedCMD_ < -saturation) {
windup = saturation - speedCMD_;
windup = -saturation - speedCMD_;
speedCMD_ = -saturation;
}