Skip to content

Commit

Permalink
Update Soldering.cpp
Browse files Browse the repository at this point in the history
fix timer logic
  • Loading branch information
neon12345 authored Aug 1, 2024
1 parent ea2deb0 commit 3d43354
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/Core/Threads/UI/logic/Soldering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ OperatingMode handleSolderingButtons(const ButtonState buttons, guiContext *cxt)
// Buttons are currently locked
if (cxt->scratch_state.state1 > 3) {
// show locked until timer is up
if ((cxt->scratch_state.state1 >> 2) < xTaskGetTickCount()) {
if ((uint16_t)(xTaskGetTickCount() << 2) - (cxt->scratch_state.state1 & ~3) > TICKS_SECOND) {
cxt->scratch_state.state1 &= 3;
} else {
warnUser(translatedString(Tr->WarningKeysLockedString), buttons);
Expand Down

0 comments on commit 3d43354

Please sign in to comment.