mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Entirely moved button flipping to GUIIThread.cpp
I don't know is it better or worse, functions the same
This commit is contained in:
@@ -43,8 +43,11 @@ guiContext context; // Conte
|
||||
OperatingMode handle_post_init_state();
|
||||
OperatingMode guiHandleDraw(void) {
|
||||
OLED::clearScreen(); // Clear ready for render pass
|
||||
bool d = getSettingValue(SettingsOptions::ReverseButtonNavEnabled);
|
||||
bool e = getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled);
|
||||
bool f = currentOperatingMode == OperatingMode::TemperatureAdjust;
|
||||
// Read button state
|
||||
ButtonState buttons = getButtonState(getSettingValue(SettingsOptions::ReverseButtonNavEnabled) and !(currentOperatingMode == OperatingMode::TemperatureAdjust));
|
||||
ButtonState buttons = getButtonState((e && f) || (d && !e && !f) || (d && e && !f));
|
||||
// Enforce screen on if buttons pressed, movement, hot tip etc
|
||||
if (buttons != BUTTON_NONE) {
|
||||
OLED::setDisplayState(OLED::DisplayState::ON);
|
||||
|
||||
@@ -54,10 +54,6 @@ OperatingMode gui_solderingTempAdjust(const ButtonState buttonIn, guiContext *cx
|
||||
if ((PRESS_ACCEL_INTERVAL_MAX - (*autoRepeatAcceleration)) < PRESS_ACCEL_INTERVAL_MIN) {
|
||||
(*autoRepeatAcceleration) = PRESS_ACCEL_INTERVAL_MAX - PRESS_ACCEL_INTERVAL_MIN;
|
||||
}
|
||||
// If buttons are flipped; flip the delta
|
||||
if (getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled)) {
|
||||
delta = -delta;
|
||||
}
|
||||
if (delta != 0) {
|
||||
// constrain between the set temp limits, i.e. 10-450 C
|
||||
int16_t newTemp = getSettingValue(SettingsOptions::SolderingTemp);
|
||||
|
||||
Reference in New Issue
Block a user