diff Discovery/Src/base.c @ 807:9e2ebfc72e8c

Zusammenf?hren
author heinrichsweikamp
date Sat, 26 Aug 2023 13:37:06 +0200
parents dd7ce655db26
children 717b460294cd
line wrap: on
line diff
--- a/Discovery/Src/base.c	Sat Aug 26 13:35:15 2023 +0200
+++ b/Discovery/Src/base.c	Sat Aug 26 13:37:06 2023 +0200
@@ -1850,9 +1850,13 @@
 				{
 					timeout_limit_Surface_in_seconds = settingsGetPointer()->timeoutSurfacemode;
 				}
-				if(timeout_in_seconds  >= timeout_limit_Surface_in_seconds)
-				{
-					gotoSleep();
+				if (timeout_in_seconds >= timeout_limit_Surface_in_seconds) {
+                    if (t7_isTimerRunning(true)) {
+                        // Delay sleep until the timer has elapsed
+                        timeout_in_seconds = timeout_limit_Surface_in_seconds - 1;
+                    } else {
+					    gotoSleep();
+                    }
 				}
 				break;
 			case BaseMenu: