mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Refactoring: unify the names of the variables related to ReverseButtonMenu handling and add the option to the end of the settings struct to avoid the collisions on factory resets
This commit is contained in:
@@ -43,7 +43,7 @@ guiContext context; // Conte
|
||||
OperatingMode handle_post_init_state();
|
||||
OperatingMode guiHandleDraw(void) {
|
||||
OLED::clearScreen(); // Clear ready for render pass
|
||||
bool d = getSettingValue(SettingsOptions::ReverseButtonNavEnabled);
|
||||
bool d = getSettingValue(SettingsOptions::ReverseButtonMenu);
|
||||
bool e = getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled);
|
||||
#ifdef REVERSE_NAV_EVERYWHERE
|
||||
bool f = currentOperatingMode == OperatingMode::TemperatureAdjust;
|
||||
|
||||
@@ -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::ReverseButtonMenu);
|
||||
#endif
|
||||
|
||||
// Flip and switch buttons accordingly
|
||||
@@ -52,4 +52,4 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) {
|
||||
OLED::setCursor(isFlipped ? 0 : 116, 0);
|
||||
ui_draw_power_source_icon();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -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::ReverseButtonMenu);
|
||||
#endif
|
||||
|
||||
// Flip and switch buttons accordingly
|
||||
@@ -51,4 +51,4 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) {
|
||||
OLED::setCursor(isFlipped ? 0 : 84, 0);
|
||||
ui_draw_power_source_icon();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -18,7 +18,7 @@ bool shouldShutdown(void) {
|
||||
}
|
||||
}
|
||||
#ifdef REVERSE_NAV_EVERYWHERE
|
||||
if (getButtonState(getSettingValue(SettingsOptions::ReverseButtonNavEnabled) == BUTTON_B_LONG) { // allow also if back button is pressed long
|
||||
if (getButtonState(getSettingValue(SettingsOptions::ReverseButtonMenu) == 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
|
||||
|
||||
Reference in New Issue
Block a user