From c74bc36178441d1d77127aadd5510eebf7ee8eba Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Fri, 4 Feb 2022 23:42:20 +0100 Subject: [PATCH 1/3] removing HALL from unsupported devices --- Translations/make_translation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Translations/make_translation.py b/Translations/make_translation.py index 217f1da2..0c3d5c71 100755 --- a/Translations/make_translation.py +++ b/Translations/make_translation.py @@ -127,7 +127,9 @@ def get_debug_menu() -> List[str]: "ACC ", "PWR ", "Max ", + #ifdef HALL_SENSOR "Hall ", + #endif ] From eba52bfd5b93498558c9af921607f74e805106a0 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Fri, 4 Feb 2022 23:43:13 +0100 Subject: [PATCH 2/3] removing HALL from unsupported devices _2 --- source/Core/Threads/GUIThread.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index b07e93bd..84b4c7bd 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -782,19 +782,17 @@ void showDebugMenu(void) { // Max deg C limit OLED::printNumber(TipThermoModel::getTipMaxInC(), 3, FontStyle::SMALL); break; +#ifdef HALL_SENSOR case 13: // Print raw hall effect value if availabe, none if hall effect disabled. -#ifdef HALL_SENSOR - { - int16_t hallEffectStrength = getRawHallEffect(); - if (hallEffectStrength < 0) - hallEffectStrength = -hallEffectStrength; - OLED::printNumber(hallEffectStrength, 6, FontStyle::SMALL); - } -#else - OLED::print(translatedString(Tr->OffString), FontStyle::SMALL); + { + int16_t hallEffectStrength = getRawHallEffect(); + if (hallEffectStrength < 0) + hallEffectStrength = -hallEffectStrength; + OLED::printNumber(hallEffectStrength, 6, FontStyle::SMALL); + } + break; #endif - break; default: break; } @@ -805,7 +803,11 @@ void showDebugMenu(void) { return; else if (b == BUTTON_F_SHORT) { screen++; +#ifdef HALL_SENSOR screen = screen % 14; +#else + screen = screen % 13; +#endif } GUIDelay(); } From 31c424bd727887c7bf8fce40bd41bd7dfd95ba91 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 5 Feb 2022 01:55:54 +0100 Subject: [PATCH 3/3] Update make_translation.py --- Translations/make_translation.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Translations/make_translation.py b/Translations/make_translation.py index 0c3d5c71..217f1da2 100755 --- a/Translations/make_translation.py +++ b/Translations/make_translation.py @@ -127,9 +127,7 @@ def get_debug_menu() -> List[str]: "ACC ", "PWR ", "Max ", - #ifdef HALL_SENSOR "Hall ", - #endif ]