From 34ede1f09adfa4e6cd7a7c5c4d93cd346c1b5f2f Mon Sep 17 00:00:00 2001 From: Stefan Koelle Date: Sun, 2 Aug 2026 13:48:29 +0200 Subject: [PATCH] fix auto return to home --- src/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index c0dde59..9edd75f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -76,8 +76,11 @@ void loop() { screens[(int)current].tick(); // Inactivity: return to home after 5 minutes without input. + // Use millis() directly — lastInteractionMs may have been updated + // during display_loop() inside this same iteration; using the stale + // `now` from loop start would underflow and trigger immediately. if (current != ScreenId::HOME && - now - lastInteractionMs >= IDLE_TIMEOUT_MS) { + millis() - lastInteractionMs >= IDLE_TIMEOUT_MS) { navigate(ScreenId::HOME); } }