From 7bb5b6adb7c5abc9f0045927fc7a82557f777b10 Mon Sep 17 00:00:00 2001 From: Christian Rahl Date: Sat, 22 Jan 2022 22:30:15 -0500 Subject: [PATCH] Added Ifdef to check against if the hall sensor is available to read. If not, read back OFF. --- source/Core/Threads/GUIThread.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index 7507c0e1..2749cd4b 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -784,12 +784,11 @@ void showDebugMenu(void) { break; case 13: // Print raw hall effect value if availabe, none if hall effect disabled. - if (getHallSensorFitted()) { + #ifdef HALL_SENSOR OLED::printNumber(getRawHallEffect(), 6, FontStyle::SMALL); - } - else { + #else OLED::print(translatedString(Tr->OffString), FontStyle::SMALL); - } + #endif break; default: break;