aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorneon12345 <[email protected]>2024-08-01 05:29:53 +0200
committerGitHub <[email protected]>2024-08-01 05:29:53 +0200
commitc0ba6eb30d1acfd9ad44920ee61b7f4cfdeb71e0 (patch)
tree1a83ba782544955abf743bf28d7399c5301fc3a5
parent34db06ab9ce67dd77867f6fd9a3b04ce48e0a35b (diff)
downloadIronOS-c0ba6eb30d1acfd9ad44920ee61b7f4cfdeb71e0.tar.gz
IronOS-c0ba6eb30d1acfd9ad44920ee61b7f4cfdeb71e0.zip
Update Soldering.cpp
revert last commit
-rw-r--r--source/Core/Threads/UI/logic/Soldering.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/source/Core/Threads/UI/logic/Soldering.cpp b/source/Core/Threads/UI/logic/Soldering.cpp
index 27dbc899..93be8841 100644
--- a/source/Core/Threads/UI/logic/Soldering.cpp
+++ b/source/Core/Threads/UI/logic/Soldering.cpp
@@ -7,7 +7,7 @@
// State 3 = buzzer timer
OperatingMode handleSolderingButtons(const ButtonState buttons, guiContext *cxt) {
- if (cxt->scratch_state.state1 & (2|3)) {
+ if (cxt->scratch_state.state1 >= 2) {
// Buttons are currently locked
switch (buttons) {
case BUTTON_F_LONG:
@@ -16,21 +16,17 @@ OperatingMode handleSolderingButtons(const ButtonState buttons, guiContext *cxt)
}
break;
case BUTTON_BOTH_LONG:
- if ((cxt->scratch_state.state1 & (2|3)) == 3) {
+ if (cxt->scratch_state.state1 == 3) {
// Unlocking
if (warnUser(translatedString(Tr->UnlockingKeysString), buttons)) {
- // cxt->scratch_state.state1 &= ~3;
- // cxt->scratch_state.state1 |= 1;
- cxt->scratch_state.state1 &= ~2;
+ cxt->scratch_state.state1 = 1;
}
} else {
warnUser(translatedString(Tr->WarningKeysLockedString), buttons);
}
break;
case BUTTON_NONE:
- //cxt->scratch_state.state1 &= ~2;
- //cxt->scratch_state.state1 |= 3;
- cxt->scratch_state.state1 |= 3;
+ cxt->scratch_state.state1 = 3;
break;
default: // Do nothing and display a lock warning
warnUser(translatedString(Tr->WarningKeysLockedString), buttons);
@@ -42,7 +38,7 @@ OperatingMode handleSolderingButtons(const ButtonState buttons, guiContext *cxt)
switch (buttons) {
case BUTTON_NONE:
cxt->scratch_state.state2 = 0;
- cxt->scratch_state.state1 &= ~1;
+ cxt->scratch_state.state1 = 0;
break;
case BUTTON_BOTH:
/*Fall through*/
@@ -62,9 +58,9 @@ OperatingMode handleSolderingButtons(const ButtonState buttons, guiContext *cxt)
case BUTTON_BOTH_LONG:
if (getSettingValue(SettingsOptions::LockingMode)) {
// Lock buttons
- if ((cxt->scratch_state.state1 & 1) == 0) {
+ if (cxt->scratch_state.state1 == 0) {
if (warnUser(translatedString(Tr->LockingKeysString), buttons)) {
- cxt->scratch_state.state1 |= 2;
+ cxt->scratch_state.state1 = 2;
}
} else {
// FIXME should be WarningKeysUnlockedString