fix: auto-reset _lock_seq_used after 5s in case Back release event is missed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-17 12:17:02 +02:00
parent e763e3ae9d
commit b2c7e249a6

View File

@@ -1237,6 +1237,9 @@ void UITask::loop() {
} else if (ev == BUTTON_EVENT_LONG_PRESS) {
c = handleLongPress(KEY_RIGHT);
}
if (_lock_seq_used && millis() - _lock_seq_ms > 5000) {
_lock_seq_used = false; // safety reset if Back release event was missed
}
ev = back_btn.check();
if (ev == BUTTON_EVENT_CLICK) {
if (_lock_seq_count > 0 || _lock_seq_used) {