1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-26 15:54:15 +01:00

LP-489 Round the smoothQuickValue to 0

This commit is contained in:
Laurent Lalanne 2017-03-01 17:00:07 +01:00
parent 7207e95447
commit e7eeba8475

View File

@ -316,6 +316,10 @@ static void AutoTuneTask(__attribute__((unused)) void *parameters)
if (smoothQuickValue > 1.001f) { if (smoothQuickValue > 1.001f) {
smoothQuickValue = -1.0f; smoothQuickValue = -1.0f;
} }
// Assume the value is 0
if (fabsf(smoothQuickValue) < 0.001f) {
smoothQuickValue = 0.0f;
}
} else { } else {
// if they did the 3x FMS toggle while disarmed, set PID's back to the middle of smoothquick // if they did the 3x FMS toggle while disarmed, set PID's back to the middle of smoothquick
smoothQuickValue = 0.0f; smoothQuickValue = 0.0f;