From 4796acbd49c01ac188412e86f3e0247eb1eb6653 Mon Sep 17 00:00:00 2001 From: bsongis Date: Sat, 21 Apr 2012 14:08:12 +0000 Subject: [PATCH] Bug in Rotary Encoders navigation (when choosing the Rotary Encoder with the Rotary Encoder ...) --- src/general_menus.cpp | 6 ++++++ src/menus.cpp | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/general_menus.cpp b/src/general_menus.cpp index aca85b11a..5e962f6a4 100644 --- a/src/general_menus.cpp +++ b/src/general_menus.cpp @@ -269,6 +269,12 @@ void menuProcSetup(uint8_t event) #if defined(ROTARY_ENCODERS) case ITEM_SETUP_RE_NAVIGATION: g_eeGeneral.reNavigation = selectMenuItem(y, STR_RENAVIG, STR_VRENAVIG, g_eeGeneral.reNavigation, 0, 2, attr, event); + if (attr && checkIncDec_Ret) { + g_rotenc[0] = 0; + g_rotenc[1] = 0; + p1valdiff = 0; + scrollRE = 0; + } break; #endif diff --git a/src/menus.cpp b/src/menus.cpp index 2904cabd5..54f76b315 100644 --- a/src/menus.cpp +++ b/src/menus.cpp @@ -165,6 +165,11 @@ void check_rotary_encoder() } } } + else { + re1valprev = 0; + p1valdiff = 0; + scrollRE = 0; + } } #endif