mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 23:08:11 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user