fix(b&w): Various rotenc. inversion bugs on radio and simu (#4405)

This commit is contained in:
Peter Feerick
2023-12-18 19:36:38 +10:00
committed by GitHub
parent 9b9e831a5e
commit 3f425e0b46
20 changed files with 23 additions and 21 deletions
+2 -1
View File
@@ -301,7 +301,8 @@ void OpenTxSimulator::rotaryEncoderEvent(int steps)
#if defined(ROTARY_ENCODER_NAVIGATION) && !defined(USE_HATS_AS_KEYS)
static uint32_t last_tick = 0;
if (steps != 0) {
if (g_eeGeneral.rotEncMode >= ROTARY_ENCODER_MODE_INVERT_BOTH) steps *= -1;
if (g_eeGeneral.rotEncMode == ROTARY_ENCODER_MODE_INVERT_BOTH)
steps *= -1;
rotencValue += steps * ROTARY_ENCODER_GRANULARITY;
// TODO: set rotencDt
uint32_t now = RTOS_GET_MS();