From a2856b7a4838d7701b79f0427b0a700084229898 Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Sun, 17 May 2026 14:30:53 +0200 Subject: [PATCH] fix: lock screen wake window no longer extends on repeated key presses Previously every key press while locked reset _lock_wake_until to now+5s, so multiple presses (or spurious button events) kept extending the window. Now the 5s timer is set only when the display first wakes from dark. The unlock sequence still extends the window on each Back+Enter step. Co-Authored-By: Claude Sonnet 4.6 --- examples/companion_radio/ui-new/UITask.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 7ce0e4d1..9fa0f97f 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -1296,10 +1296,7 @@ void UITask::loop() { { uint32_t aoff = autoOffMillis(); if (aoff > 0) _auto_off = millis() + aoff; } // extend auto-off timer _next_refresh = 100; // trigger refresh } else if (_locked) { - // Locked: eat all keys (unlock sequence handled at button-event level above) - // Any key extends the wake window if display is already on - if (_display != NULL && _display->isOn()) - _lock_wake_until = millis() + 5000; + // Locked: eat all keys — wake window is set only when display first turns on _next_refresh = 0; } }