diff options
author | neon12345 <[email protected]> | 2024-08-11 00:38:22 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-11 00:38:22 +0200 |
commit | d8b7c73b8ea092201d8a452aec75fc0f33b10555 (patch) | |
tree | 180d8b54132a3d54b15de5d52529ce91fc6fbc80 | |
parent | dfbf45a1c480abe30847be3fb0915d360707943d (diff) | |
download | IronOS-d8b7c73b8ea092201d8a452aec75fc0f33b10555.tar.gz IronOS-d8b7c73b8ea092201d8a452aec75fc0f33b10555.zip |
Update Soldering.cpp
allow unlock during locked warning
-rw-r--r-- | source/Core/Threads/UI/logic/Soldering.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/source/Core/Threads/UI/logic/Soldering.cpp b/source/Core/Threads/UI/logic/Soldering.cpp index 35a7398a..a2303441 100644 --- a/source/Core/Threads/UI/logic/Soldering.cpp +++ b/source/Core/Threads/UI/logic/Soldering.cpp @@ -9,6 +9,18 @@ OperatingMode handleSolderingButtons(const ButtonState buttons, guiContext *cxt) { if (cxt->scratch_state.state1 >= 2) { // Buttons are currently locked + if (buttons == BUTTON_BOTH_LONG) { + if (cxt->scratch_state.state1 == 3) { + // Unlocking + if (warnUser(translatedString(Tr->UnlockingKeysString), buttons)) { + cxt->scratch_state.state1 = 1; + cxt->scratch_state.state7 = 0; + } + } else { + warnUser(translatedString(Tr->WarningKeysLockedString), buttons); + } + return OperatingMode::Soldering; + } if (cxt->scratch_state.state7 != 0) { // show locked until timer is up if (xTaskGetTickCount() >= cxt->scratch_state.state7) { @@ -19,16 +31,6 @@ OperatingMode handleSolderingButtons(const ButtonState buttons, guiContext *cxt) } } switch (buttons) { - case BUTTON_BOTH_LONG: - if (cxt->scratch_state.state1 == 3) { - // Unlocking - if (warnUser(translatedString(Tr->UnlockingKeysString), buttons)) { - cxt->scratch_state.state1 = 1; - } - } else { - warnUser(translatedString(Tr->WarningKeysLockedString), buttons); - } - break; case BUTTON_NONE: cxt->scratch_state.state1 = 3; break; |