1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 01:05:27 +03:00

address style requests

This commit is contained in:
Thorsten Laux 2018-05-25 07:16:23 +02:00
parent e1ff2566c6
commit 0086932946

View file

@ -635,11 +635,13 @@ void FAST_CODE pidController(const pidProfile_t *pidProfile, const rollAndPitchT
DEBUG_SET(DEBUG_ITERM_RELAX, 1, gyroTargetLow);
const float gmax = MAX(gyroTargetHigh, gyroTargetLow);
const float gmin = MIN(gyroTargetHigh, gyroTargetLow);
if (gyroRate >= gmin && gyroRate <= gmax)
if (gyroRate >= gmin && gyroRate <= gmax) {
itermErrorRate = 0.0f;
else
}
else {
itermErrorRate = (gyroRate > gmax ? gmax : gmin ) - gyroRate;
}
}
else itermErrorRate = errorRate;
const float ITerm = pidData[axis].I;