From 3fb0a55aef69d64757db9634570b5a03202a25f6 Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Sun, 17 May 2026 12:17:02 +0200 Subject: [PATCH] fix: auto-reset _lock_seq_used after 5s in case Back release event is missed Co-Authored-By: Claude Sonnet 4.6 --- examples/companion_radio/ui-new/UITask.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 40f7d775..7ce0e4d1 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -1236,6 +1236,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) {