From b7bfa3f4cf31b02fe9e4b452bb702c04336015ec Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 11:16:29 +0200 Subject: [PATCH 1/9] Reverse Settings.h --- source/Core/Inc/Settings.h | 62 +++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/source/Core/Inc/Settings.h b/source/Core/Inc/Settings.h index 2366b772..e1c00f9c 100644 --- a/source/Core/Inc/Settings.h +++ b/source/Core/Inc/Settings.h @@ -47,38 +47,38 @@ enum SettingsOptions { CalibrationOffset = 23, // This stores the temperature offset for this tip in the iron. PowerLimit = 24, // Maximum power iron allowed to output ReverseButtonTempChangeEnabled = 25, // Change the plus and minus button assigment - ReverseButtonNavEnabled = 26, // Change the A and B button assigment in menus - TempChangeLongStep = 27, // Temperature-change-increment on long button press - TempChangeShortStep = 28, // Temperature-change-increment on short button press - HallEffectSensitivity = 29, // Operating mode of the hall effect sensor - AccelMissingWarningCounter = 30, // Counter of how many times we have warned we cannot detect the accelerometer - PDMissingWarningCounter = 31, // Counter of how many times we have warned we cannot detect the pd interface - UILanguage = 32, // Selected UI Language code, null-terminated *only if* the length is less than 8 chars - PDNegTimeout = 33, // PD timeout in 100ms steps - OLEDInversion = 34, // Invert the colours on the display - OLEDBrightness = 35, // Brightness for the OLED display - LOGOTime = 36, // Duration the logo will be displayed for - CalibrateCJC = 37, // Toggle calibrate CJC at next boot - BluetoothLE = 38, // Toggle BLE if present - USBPDMode = 39, // Toggle PPS & EPR - ProfilePhases = 40, // Number of profile mode phases - ProfilePreheatTemp = 41, // Temperature to preheat to before the first phase - ProfilePreheatSpeed = 42, // Maximum allowed preheat speed in degrees per second - ProfilePhase1Temp = 43, // Temperature to target for the end of phase 1 - ProfilePhase1Duration = 44, // Target duration for phase 1 - ProfilePhase2Temp = 45, // Temperature to target for the end of phase 2 - ProfilePhase2Duration = 46, // Target duration for phase 2 - ProfilePhase3Temp = 47, // Temperature to target for the end of phase 3 - ProfilePhase3Duration = 48, // Target duration for phase 3 - ProfilePhase4Temp = 49, // Temperature to target for the end of phase 4 - ProfilePhase4Duration = 50, // Target duration for phase 4 - ProfilePhase5Temp = 51, // Temperature to target for the end of phase 5 - ProfilePhase5Duration = 52, // Target duration for phase 5 - ProfileCooldownSpeed = 53, // Maximum allowed cooldown speed in degrees per second - HallEffectSleepTime = 54, // Seconds (/5) timeout to sleep when hall effect over threshold - SolderingTipType = 55, // Selecting the type of soldering tip fitted + TempChangeLongStep = 26, // Temperature-change-increment on long button press + TempChangeShortStep = 27, // Temperature-change-increment on short button press + HallEffectSensitivity = 28, // Operating mode of the hall effect sensor + AccelMissingWarningCounter = 29, // Counter of how many times we have warned we cannot detect the accelerometer + PDMissingWarningCounter = 30, // Counter of how many times we have warned we cannot detect the pd interface + UILanguage = 31, // Selected UI Language code, null-terminated *only if* the length is less than 8 chars + PDNegTimeout = 32, // PD timeout in 100ms steps + OLEDInversion = 33, // Invert the colours on the display + OLEDBrightness = 34, // Brightness for the OLED display + LOGOTime = 35, // Duration the logo will be displayed for + CalibrateCJC = 36, // Toggle calibrate CJC at next boot + BluetoothLE = 37, // Toggle BLE if present + USBPDMode = 38, // Toggle PPS & EPR + ProfilePhases = 39, // Number of profile mode phases + ProfilePreheatTemp = 40, // Temperature to preheat to before the first phase + ProfilePreheatSpeed = 41, // Maximum allowed preheat speed in degrees per second + ProfilePhase1Temp = 42, // Temperature to target for the end of phase 1 + ProfilePhase1Duration = 43, // Target duration for phase 1 + ProfilePhase2Temp = 44, // Temperature to target for the end of phase 2 + ProfilePhase2Duration = 45, // Target duration for phase 2 + ProfilePhase3Temp = 46, // Temperature to target for the end of phase 3 + ProfilePhase3Duration = 47, // Target duration for phase 3 + ProfilePhase4Temp = 48, // Temperature to target for the end of phase 4 + ProfilePhase4Duration = 49, // Target duration for phase 4 + ProfilePhase5Temp = 50, // Temperature to target for the end of phase 5 + ProfilePhase5Duration = 51, // Target duration for phase 5 + ProfileCooldownSpeed = 52, // Maximum allowed cooldown speed in degrees per second + HallEffectSleepTime = 53, // Seconds (/5) timeout to sleep when hall effect over threshold + SolderingTipType = 54, // Selecting the type of soldering tip fitted + ReverseButtonNavEnabled = 55, // Change the A and B button assigment in menus // - SettingsOptionsLength = 56, // End marker + SettingsOptionsLength = 55, // End marker }; typedef enum { From 68116f7de2415e76954a785df958931f529964ac Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 11:38:52 +0200 Subject: [PATCH 2/9] Revert "Reverse Settings.h" --- source/Core/Inc/Settings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/Inc/Settings.h b/source/Core/Inc/Settings.h index e1c00f9c..35fde7da 100644 --- a/source/Core/Inc/Settings.h +++ b/source/Core/Inc/Settings.h @@ -78,7 +78,7 @@ enum SettingsOptions { SolderingTipType = 54, // Selecting the type of soldering tip fitted ReverseButtonNavEnabled = 55, // Change the A and B button assigment in menus // - SettingsOptionsLength = 55, // End marker + SettingsOptionsLength = 56, // End marker }; typedef enum { From e346a7793ec16a534324a7b98f6e7ffd081c6a44 Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 18:30:08 +0200 Subject: [PATCH 3/9] Requested change Now it flips buttons only in menu by default, however i need the other option, so i've added definition "REVERSE_NAV_EVERYWHERE" --- source/Core/Threads/GUIThread.cpp | 16 ++++++++++++++-- .../mono_128x32/draw_homescreen_simplified.cpp | 16 ++++++++++++++++ .../mono_96x16/draw_homescreen_simplified.cpp | 16 ++++++++++++++++ .../UI/logic/utils/shouldDeviceShutdown.cpp | 6 +++++- 4 files changed, 51 insertions(+), 3 deletions(-) diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index 4d343f91..746bfd65 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -45,9 +45,13 @@ OperatingMode guiHandleDraw(void) { OLED::clearScreen(); // Clear ready for render pass bool d = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); bool e = getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled); + #ifdef REVERSE_NAV_EVERYWHERE bool f = currentOperatingMode == OperatingMode::TemperatureAdjust; // Read button state ButtonState buttons = getButtonState((e && f) || (d && !e && !f) || (d && e && !f)); + #else + ButtonState buttons = getButtonState(); + #endif // Enforce screen on if buttons pressed, movement, hot tip etc if (buttons != BUTTON_NONE) { OLED::setDisplayState(OLED::DisplayState::ON); @@ -113,7 +117,11 @@ OperatingMode guiHandleDraw(void) { newMode = gui_SolderingSleepingMode(buttons, &context); break; case OperatingMode::TemperatureAdjust: - newMode = gui_solderingTempAdjust(buttons, &context); + #ifdef REVERSE_NAV_EVERYWHERE + newMode = gui_solderingTempAdjust(getButtonState(), &context); + #else + newMode = gui_solderingTempAdjust(getButtonState(e), &context); + #endif break; case OperatingMode::DebugMenuReadout: newMode = showDebugMenu(buttons, &context); @@ -122,7 +130,11 @@ OperatingMode guiHandleDraw(void) { newMode = performCJCC(buttons, &context); break; case OperatingMode::SettingsMenu: - newMode = gui_SettingsMenu(buttons, &context); + #ifdef REVERSE_NAV_EVERYWHERE + newMode = gui_SettingsMenu(getButtonState(), &context); + #else + newMode = gui_SettingsMenu(getButtonState(d), &context); + #endif break; case OperatingMode::InitialisationDone: newMode = handle_post_init_state(); diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index c0e13e5e..2cb4e75c 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -8,27 +8,43 @@ extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); + #ifdef REVERSE_NAV_EVERYWHERE bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + #endif bool tipDisconnected = isTipDisconnected(); // Flip and switch buttons accordingly + #ifdef REVERSE_NAV_EVERYWHERE OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); + #else + OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? buttonAF : buttonA); + OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? buttonBF : buttonB); + #endif if ((tipTemp > 55) || tipDisconnected) { // draw temp over the start soldering button // Location changes on screen rotation and due to button swapping // in right handed mode we want to draw over the first part + #ifdef REVERSE_NAV_EVERYWHERE OLED::fillArea(isReverse ? (isFlipped ? 26 : 58) : (isFlipped ? 68 : 0), 0, 56, 32, 0); // clear the area OLED::setCursor(isReverse ? (isFlipped ? 27 : 59) : (isFlipped ? 56 : 0), 0); + #else + OLED::fillArea(isFlipped ? 68 : 0, 0, 56, 32, 0); // clear the area + OLED::setCursor(isFlipped ? 56 : 0, 0); + #endif // If tip is disconnected draw the notification, otherwise - the temp if (tipDisconnected) { // Draw-in the missing tip symbol + #ifdef REVERSE_NAV_EVERYWHERE if (isReverse) { OLED::drawArea(isFlipped ? 20 : 54, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); } else { + #endif OLED::drawArea(isFlipped ? 54 : 0, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); + #ifdef REVERSE_NAV_EVERYWHERE } + #endif } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp } diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 779e0085..41bf290f 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -7,27 +7,43 @@ extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); + #ifdef REVERSE_NAV_EVERYWHERE bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + #endif bool tipDisconnected = isTipDisconnected(); // Flip and switch buttons accordingly + #ifdef REVERSE_NAV_EVERYWHERE OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); + #else + OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? buttonAF : buttonA); + OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? buttonBF : buttonB); + #endif if ((tipTemp > 55) || tipDisconnected) { // draw temp over the start soldering button // Location changes on screen rotation and due to button swapping // in right handed mode we want to draw over the first part + #ifdef REVERSE_NAV_EVERYWHERE OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0); + #else + OLED::fillArea(isFlipped ? 55 : 0, 0, 41, 16, 0); // clear the area + OLED::setCursor(isFlipped ? 56 : 0, 0); + #endif // If tip is disconnected draw the notification, otherwise - the temp if (tipDisconnected) { // Draw-in the missing tip symbol + #ifdef REVERSE_NAV_EVERYWHERE if (isReverse) { OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); } else { + #endif OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); + #ifdef REVERSE_NAV_EVERYWHERE } + #endif } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp } diff --git a/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp b/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp index d050a3ce..bd16513f 100644 --- a/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp +++ b/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp @@ -17,7 +17,11 @@ bool shouldShutdown(void) { } } } - if (getButtonState(getSettingValue(SettingsOptions::ReverseButtonNavEnabled)) == BUTTON_B_LONG) { // allow also if back button is pressed long + #ifdef REVERSE_NAV_EVERYWHERE + if (getButtonState(getSettingValue(SettingsOptions::ReverseButtonNavEnabled) == BUTTON_B_LONG) { // allow also if back button is pressed long + #else + if (getButtonState() == BUTTON_B_LONG) { // allow also if back button is pressed long + #endif return true; } return false; From 157769b09945f2d18911b3674f704ef9cd42a276 Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 18:33:30 +0200 Subject: [PATCH 4/9] -style --- .../Miniware/Vendor/CMSIS/Include/arm_math.h | 2 +- .../Vendor/NMSIS/Core/Include/nmsis_version.h | 4 ++-- .../nmsis/core/inc/core_feature_eclic.h | 4 ++-- .../components/nmsis/core/inc/nmsis_version.h | 4 ++-- .../Sequre/Vendor/CMSIS/Include/arm_math.h | 2 +- source/Core/Drivers/Font.h | 10 ++++---- source/Core/Threads/GUIThread.cpp | 18 +++++++------- .../draw_homescreen_simplified.cpp | 24 +++++++++---------- .../mono_96x16/draw_homescreen_simplified.cpp | 24 +++++++++---------- .../UI/logic/utils/shouldDeviceShutdown.cpp | 6 ++--- 10 files changed, 49 insertions(+), 49 deletions(-) diff --git a/source/Core/BSP/Miniware/Vendor/CMSIS/Include/arm_math.h b/source/Core/BSP/Miniware/Vendor/CMSIS/Include/arm_math.h index e78a3b47..c59b9d19 100644 --- a/source/Core/BSP/Miniware/Vendor/CMSIS/Include/arm_math.h +++ b/source/Core/BSP/Miniware/Vendor/CMSIS/Include/arm_math.h @@ -495,7 +495,7 @@ static __INLINE q63_t mult32x64(q63_t x, q31_t y) { return ((((q63_t)(x & 0x0000 /* #if defined (ARM_MATH_CM0_FAMILY) && defined ( __CC_ARM ) #define __CLZ __clz - #endif +#endif */ /* note: function can be removed when all toolchain support __CLZ for Cortex-M0 */ #if defined(ARM_MATH_CM0_FAMILY) && ((defined(__ICCARM__))) diff --git a/source/Core/BSP/Pinecil/Vendor/NMSIS/Core/Include/nmsis_version.h b/source/Core/BSP/Pinecil/Vendor/NMSIS/Core/Include/nmsis_version.h index 4b7a5c32..861d7204 100644 --- a/source/Core/BSP/Pinecil/Vendor/NMSIS/Core/Include/nmsis_version.h +++ b/source/Core/BSP/Pinecil/Vendor/NMSIS/Core/Include/nmsis_version.h @@ -36,9 +36,9 @@ * \code * #if defined(__NMSIS_VERSION) && (__NMSIS_VERSION >= 0x00010105) * #warning "Yes, we have NMSIS 1.1.5 or later" - * #else + * #else * #error "We need NMSIS 1.1.5 or later!" - * #endif + * #endif * \endcode * * @{ diff --git a/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/core_feature_eclic.h b/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/core_feature_eclic.h index cac14ef0..7eb678e4 100644 --- a/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/core_feature_eclic.h +++ b/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/core_feature_eclic.h @@ -206,7 +206,7 @@ typedef enum IRQn { #ifdef NMSIS_ECLIC_VIRTUAL #ifndef NMSIS_ECLIC_VIRTUAL_HEADER_FILE #define NMSIS_ECLIC_VIRTUAL_HEADER_FILE "nmsis_eclic_virtual.h" - #endif + #endif #include NMSIS_ECLIC_VIRTUAL_HEADER_FILE #else #define ECLIC_SetCfgNlbits __ECLIC_SetCfgNlbits @@ -238,7 +238,7 @@ typedef enum IRQn { #ifdef NMSIS_VECTAB_VIRTUAL #ifndef NMSIS_VECTAB_VIRTUAL_HEADER_FILE #define NMSIS_VECTAB_VIRTUAL_HEADER_FILE "nmsis_vectab_virtual.h" - #endif + #endif #include NMSIS_VECTAB_VIRTUAL_HEADER_FILE #else #define ECLIC_SetVector __ECLIC_SetVector diff --git a/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/nmsis_version.h b/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/nmsis_version.h index 16507998..82b7fcc8 100644 --- a/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/nmsis_version.h +++ b/source/Core/BSP/Pinecilv2/bl_mcu_sdk/components/nmsis/core/inc/nmsis_version.h @@ -36,9 +36,9 @@ * \code * #if defined(__NMSIS_VERSION) && (__NMSIS_VERSION >= 0x00010105) * #warning "Yes, we have NMSIS 1.1.5 or later" - * #else + * #else * #error "We need NMSIS 1.1.5 or later!" - * #endif + * #endif * \endcode * * @{ diff --git a/source/Core/BSP/Sequre/Vendor/CMSIS/Include/arm_math.h b/source/Core/BSP/Sequre/Vendor/CMSIS/Include/arm_math.h index e78a3b47..c59b9d19 100644 --- a/source/Core/BSP/Sequre/Vendor/CMSIS/Include/arm_math.h +++ b/source/Core/BSP/Sequre/Vendor/CMSIS/Include/arm_math.h @@ -495,7 +495,7 @@ static __INLINE q63_t mult32x64(q63_t x, q31_t y) { return ((((q63_t)(x & 0x0000 /* #if defined (ARM_MATH_CM0_FAMILY) && defined ( __CC_ARM ) #define __CLZ __clz - #endif +#endif */ /* note: function can be removed when all toolchain support __CLZ for Cortex-M0 */ #if defined(ARM_MATH_CM0_FAMILY) && ((defined(__ICCARM__))) diff --git a/source/Core/Drivers/Font.h b/source/Core/Drivers/Font.h index 0d0943ff..1c17a561 100644 --- a/source/Core/Drivers/Font.h +++ b/source/Core/Drivers/Font.h @@ -168,7 +168,7 @@ 0x03, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - #endif + #endif const uint8_t buttonB[] = { // width = 56 @@ -356,7 +356,7 @@ 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x2b, 0x09, 0x07, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x04, 0x02, 0x01, } }; - #else +#else #if defined(MODEL_TS100) || defined(MODEL_Pinecil) || defined(MODEL_Pinecilv2) const uint8_t buttonA[] = { // width = 42 @@ -401,7 +401,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xd0, 0xc8, 0x08, 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - #endif + #endif const uint8_t buttonB[] = { // width = 42 @@ -578,8 +578,8 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE8, 0x70, 0x7A, 0x5E, 0x8E, 0x1C, 0x30, 0x00, // 0x00, 0x10, 0x38, 0x1C, 0x0E, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // - #endif - }; #endif + }; +#endif // clang-format on #endif /* FONT_H_ */ \ No newline at end of file diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index 746bfd65..828936d3 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -45,13 +45,13 @@ OperatingMode guiHandleDraw(void) { OLED::clearScreen(); // Clear ready for render pass bool d = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); bool e = getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled); - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE bool f = currentOperatingMode == OperatingMode::TemperatureAdjust; // Read button state ButtonState buttons = getButtonState((e && f) || (d && !e && !f) || (d && e && !f)); - #else +#else ButtonState buttons = getButtonState(); - #endif +#endif // Enforce screen on if buttons pressed, movement, hot tip etc if (buttons != BUTTON_NONE) { OLED::setDisplayState(OLED::DisplayState::ON); @@ -117,11 +117,11 @@ OperatingMode guiHandleDraw(void) { newMode = gui_SolderingSleepingMode(buttons, &context); break; case OperatingMode::TemperatureAdjust: - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE newMode = gui_solderingTempAdjust(getButtonState(), &context); - #else +#else newMode = gui_solderingTempAdjust(getButtonState(e), &context); - #endif +#endif break; case OperatingMode::DebugMenuReadout: newMode = showDebugMenu(buttons, &context); @@ -130,11 +130,11 @@ OperatingMode guiHandleDraw(void) { newMode = performCJCC(buttons, &context); break; case OperatingMode::SettingsMenu: - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE newMode = gui_SettingsMenu(getButtonState(), &context); - #else +#else newMode = gui_SettingsMenu(getButtonState(d), &context); - #endif +#endif break; case OperatingMode::InitialisationDone: newMode = handle_post_init_state(); diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index 2cb4e75c..3c4cca5a 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -8,43 +8,43 @@ extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); - #endif +#endif bool tipDisconnected = isTipDisconnected(); // Flip and switch buttons accordingly - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); - #else +#else OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? buttonAF : buttonA); OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? buttonBF : buttonB); - #endif +#endif if ((tipTemp > 55) || tipDisconnected) { // draw temp over the start soldering button // Location changes on screen rotation and due to button swapping // in right handed mode we want to draw over the first part - #ifdef REVERSE_NAV_EVERYWHERE + #ifdef REVERSE_NAV_EVERYWHERE OLED::fillArea(isReverse ? (isFlipped ? 26 : 58) : (isFlipped ? 68 : 0), 0, 56, 32, 0); // clear the area OLED::setCursor(isReverse ? (isFlipped ? 27 : 59) : (isFlipped ? 56 : 0), 0); - #else + #else OLED::fillArea(isFlipped ? 68 : 0, 0, 56, 32, 0); // clear the area OLED::setCursor(isFlipped ? 56 : 0, 0); - #endif + #endif // If tip is disconnected draw the notification, otherwise - the temp if (tipDisconnected) { // Draw-in the missing tip symbol - #ifdef REVERSE_NAV_EVERYWHERE + #ifdef REVERSE_NAV_EVERYWHERE if (isReverse) { OLED::drawArea(isFlipped ? 20 : 54, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); } else { - #endif + #endif OLED::drawArea(isFlipped ? 54 : 0, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); - #ifdef REVERSE_NAV_EVERYWHERE + #ifdef REVERSE_NAV_EVERYWHERE } - #endif + #endif } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp } diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 41bf290f..f10b373c 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -7,43 +7,43 @@ extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); - #endif +#endif bool tipDisconnected = isTipDisconnected(); // Flip and switch buttons accordingly - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA)); OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB)); - #else +#else OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? buttonAF : buttonA); OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? buttonBF : buttonB); - #endif +#endif if ((tipTemp > 55) || tipDisconnected) { // draw temp over the start soldering button // Location changes on screen rotation and due to button swapping // in right handed mode we want to draw over the first part - #ifdef REVERSE_NAV_EVERYWHERE + #ifdef REVERSE_NAV_EVERYWHERE OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0); - #else + #else OLED::fillArea(isFlipped ? 55 : 0, 0, 41, 16, 0); // clear the area OLED::setCursor(isFlipped ? 56 : 0, 0); - #endif + #endif // If tip is disconnected draw the notification, otherwise - the temp if (tipDisconnected) { // Draw-in the missing tip symbol - #ifdef REVERSE_NAV_EVERYWHERE + #ifdef REVERSE_NAV_EVERYWHERE if (isReverse) { OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); } else { - #endif + #endif OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); - #ifdef REVERSE_NAV_EVERYWHERE + #ifdef REVERSE_NAV_EVERYWHERE } - #endif + #endif } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp } diff --git a/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp b/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp index bd16513f..a71fa4ed 100644 --- a/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp +++ b/source/Core/Threads/UI/logic/utils/shouldDeviceShutdown.cpp @@ -17,11 +17,11 @@ bool shouldShutdown(void) { } } } - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE if (getButtonState(getSettingValue(SettingsOptions::ReverseButtonNavEnabled) == BUTTON_B_LONG) { // allow also if back button is pressed long - #else +#else if (getButtonState() == BUTTON_B_LONG) { // allow also if back button is pressed long - #endif +#endif return true; } return false; From 5e78168c90c203b4e95704c6e2c7056b148b0e9f Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 18:38:17 +0200 Subject: [PATCH 5/9] -style --- .../mono_128x32/draw_homescreen_simplified.cpp | 14 +++++++------- .../mono_96x16/draw_homescreen_simplified.cpp | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index 3c4cca5a..dd2c86b9 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -26,25 +26,25 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { // draw temp over the start soldering button // Location changes on screen rotation and due to button swapping // in right handed mode we want to draw over the first part - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE OLED::fillArea(isReverse ? (isFlipped ? 26 : 58) : (isFlipped ? 68 : 0), 0, 56, 32, 0); // clear the area OLED::setCursor(isReverse ? (isFlipped ? 27 : 59) : (isFlipped ? 56 : 0), 0); - #else +#else OLED::fillArea(isFlipped ? 68 : 0, 0, 56, 32, 0); // clear the area OLED::setCursor(isFlipped ? 56 : 0, 0); - #endif +#endif // If tip is disconnected draw the notification, otherwise - the temp if (tipDisconnected) { // Draw-in the missing tip symbol - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE if (isReverse) { OLED::drawArea(isFlipped ? 20 : 54, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); } else { - #endif +#endif OLED::drawArea(isFlipped ? 54 : 0, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip); - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE } - #endif +#endif } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp } diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index f10b373c..3b47e715 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -25,25 +25,25 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { // draw temp over the start soldering button // Location changes on screen rotation and due to button swapping // in right handed mode we want to draw over the first part - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0); - #else +#else OLED::fillArea(isFlipped ? 55 : 0, 0, 41, 16, 0); // clear the area OLED::setCursor(isFlipped ? 56 : 0, 0); - #endif +#endif // If tip is disconnected draw the notification, otherwise - the temp if (tipDisconnected) { // Draw-in the missing tip symbol - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE if (isReverse) { OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); } else { - #endif +#endif OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip); - #ifdef REVERSE_NAV_EVERYWHERE +#ifdef REVERSE_NAV_EVERYWHERE } - #endif +#endif } else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp } From 79cb0b5d92b10086807aecc35793dbf3273615b7 Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 18:40:34 +0200 Subject: [PATCH 6/9] style(3) --- .../UI/drawing/mono_128x32/draw_homescreen_simplified.cpp | 2 +- .../UI/drawing/mono_96x16/draw_homescreen_simplified.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index dd2c86b9..8adf8594 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -8,10 +8,10 @@ extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); + bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); #endif - bool tipDisconnected = isTipDisconnected(); // Flip and switch buttons accordingly #ifdef REVERSE_NAV_EVERYWHERE diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 3b47e715..086fbc4c 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -7,10 +7,10 @@ extern uint8_t disconnectedTipF[sizeof(disconnectedTip)]; void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); + bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); #endif - bool tipDisconnected = isTipDisconnected(); // Flip and switch buttons accordingly #ifdef REVERSE_NAV_EVERYWHERE From 9993fc1a1954070eb7df45c323a165ff7086a1a0 Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 18:43:03 +0200 Subject: [PATCH 7/9] style(4) --- .../UI/drawing/mono_128x32/draw_homescreen_simplified.cpp | 2 +- .../UI/drawing/mono_96x16/draw_homescreen_simplified.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index 8adf8594..f7236fb7 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -10,7 +10,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); #endif // Flip and switch buttons accordingly diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 086fbc4c..42f7cfd0 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -9,7 +9,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); #endif // Flip and switch buttons accordingly From b6642ac01b87cfa91d7af8ffd1d1a29127a7da8e Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 18:47:44 +0200 Subject: [PATCH 8/9] style (5) --- .../UI/drawing/mono_128x32/draw_homescreen_simplified.cpp | 2 +- .../UI/drawing/mono_96x16/draw_homescreen_simplified.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index f7236fb7..9fee996c 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -10,7 +10,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); +bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); #endif // Flip and switch buttons accordingly diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index 42f7cfd0..c6d4f4a4 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -9,7 +9,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE - bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); +bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); #endif // Flip and switch buttons accordingly From ef8c9a6c20c5a6f6f1edea6aafc47ecc80f130f4 Mon Sep 17 00:00:00 2001 From: resistancelion Date: Thu, 30 Jan 2025 18:49:30 +0200 Subject: [PATCH 9/9] style (6) --- .../UI/drawing/mono_128x32/draw_homescreen_simplified.cpp | 2 +- .../UI/drawing/mono_96x16/draw_homescreen_simplified.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp index 9fee996c..d6146711 100644 --- a/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_128x32/draw_homescreen_simplified.cpp @@ -10,7 +10,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE -bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); #endif // Flip and switch buttons accordingly diff --git a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp index c6d4f4a4..645be122 100644 --- a/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp +++ b/source/Core/Threads/UI/drawing/mono_96x16/draw_homescreen_simplified.cpp @@ -9,7 +9,7 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) { bool isFlipped = OLED::getRotation(); bool tipDisconnected = isTipDisconnected(); #ifdef REVERSE_NAV_EVERYWHERE -bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); + bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); #endif // Flip and switch buttons accordingly