aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorneon12345 <[email protected]>2024-08-11 00:38:22 +0200
committerGitHub <[email protected]>2024-08-11 00:38:22 +0200
commitd8b7c73b8ea092201d8a452aec75fc0f33b10555 (patch)
tree180d8b54132a3d54b15de5d52529ce91fc6fbc80
parentdfbf45a1c480abe30847be3fb0915d360707943d (diff)
downloadIronOS-d8b7c73b8ea092201d8a452aec75fc0f33b10555.tar.gz
IronOS-d8b7c73b8ea092201d8a452aec75fc0f33b10555.zip
Update Soldering.cpp
allow unlock during locked warning
-rw-r--r--source/Core/Threads/UI/logic/Soldering.cpp22
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;