fix(surface): THs throttle timer may start counting when throttle is centered (#6323)

This commit is contained in:
philmoz
2025-05-30 20:21:14 +10:00
committed by GitHub
parent f0056e2dea
commit 11a3dd7d7a
+8 -1
View File
@@ -1316,7 +1316,14 @@ void doMixerPeriodicUpdates()
val = RESX + calibratedAnalogs[g_model.thrTraceSrc == 0 ? inputMappingConvertMode(inputMappingGetThrottle()) : g_model.thrTraceSrc + MAX_STICKS - 1];
}
val >>= (RESX_SHIFT-6); // calibrate it (resolution increased by factor 4)
// calibrate it (resolution increased by factor 4)
#if defined(SURFACE_RADIO)
// For surface radio round to nearest value for center point calculation in evalTimers
val = (val + ((1 << (RESX_SHIFT - 6)) / 2)) >> (RESX_SHIFT - 6);
#else
// Use previous calculation for air radios to avoid breaking things
val = val >> (RESX_SHIFT - 6);
#endif
evalTimers(val, tick10ms);