add const, remove float cast

This commit is contained in:
ctzsnooze 2018-09-12 22:02:07 +10:00
parent f545637669
commit 942d1bb384
1 changed files with 1 additions and 1 deletions

View File

@ -444,7 +444,7 @@ void pidInitConfig(const pidProfile_t *pidProfile)
maxVelocity[FD_ROLL] = maxVelocity[FD_PITCH] = pidProfile->rateAccelLimit * 100 * dT;
maxVelocity[FD_YAW] = pidProfile->yawRateAccelLimit * 100 * dT;
if (pidProfile->itermWindupPointPercent < 100) {
float ITermWindupPoint = (float)pidProfile->itermWindupPointPercent / 100.0f;
const float ITermWindupPoint = pidProfile->itermWindupPointPercent / 100.0f;
ITermWindupPointInv = 1.0f / (1.0f - ITermWindupPoint);
}
itermAcceleratorGain = pidProfile->itermAcceleratorGain;