1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-19 14:25:16 +03:00

Move PID gains to UINT16 instead of UINT8. Keep it compatible on the MSP level

This commit is contained in:
Pawel Spychalski (DzikuVx) 2020-12-04 20:38:34 +01:00
parent ebf581c871
commit d32fe6dea5
12 changed files with 122 additions and 65 deletions

View file

@ -1961,6 +1961,10 @@ float navPidApply3(
pid->integrator = newIntegrator;
}
}
if (pidFlags & PID_LIMIT_INTEGRATOR) {
pid->integrator = constrainf(pid->integrator, outMin, outMax);
}
return outValConstrained;
}