mirror of
https://github.com/skoelle/wt32sc01-dashboard.git
synced 2026-09-17 17:30:25 +00:00
fix auto return to home
This commit is contained in:
+4
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user