diff --git a/source/Core/Threads/UI/logic/Soldering.cpp b/source/Core/Threads/UI/logic/Soldering.cpp index f4ff487e0..35e5e9794 100644 --- a/source/Core/Threads/UI/logic/Soldering.cpp +++ b/source/Core/Threads/UI/logic/Soldering.cpp @@ -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);