Skip to content

Commit 1adceca

Browse files
committed
Fix countdown for sleep timer
1 parent f6b7b1e commit 1adceca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

esp32/modules/splash.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ def badge_sleep_forever():
312312
def splashTimer_callback(tmr):
313313
global loopCnt
314314
global timer_loop_amount
315+
#print("[TIMER] "+str(loopCnt))
315316
if loopCnt<1:
316317
loopCnt = timer_loop_amount
317318
cstate = badge.battery_charge_status()
@@ -475,6 +476,8 @@ def load_settings():
475476
splash_timer_interval = badge.nvs_get_u16('splash', 'timer.interval', 200)
476477
global timer_loop_amount
477478
timer_loop_amount = badge.nvs_get_u8('splash', 'timer.amount', 25)
479+
global loopCnt
480+
loopCnt = timer_loop_amount
478481

479482
# MAIN
480483
def splash_main():
@@ -508,7 +511,7 @@ def splash_main():
508511
# GLOBALS (With defaults that will probably never be used)
509512
splashTimer = machine.Timer(0)
510513
services = []
511-
timer_loop_amount = 10
514+
timer_loop_amount = 9999
512515
loopCnt = timer_loop_amount
513516
header_fg = ugfx.BLACK
514517
header_bg = ugfx.WHITE

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy