Skip to content

Commit b8b085c

Browse files
committed
When no services want to specify a wakeup time, the wakeup time was being
set to -1 before checking if the wakeup time was too short. Move that after the check to avoid a frequent redraw while the badge isn't in deep sleep.
1 parent 2cdd339 commit b8b085c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

esp32/modules/tasks/services.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,15 @@ def draw_task():
158158

159159
badge.eink_busy_wait()
160160

161-
if requestedInterval>=99999999:
162-
print("[SERVICES] No draw interval returned.")
163-
requestedInterval = -1
164-
165161
if requestedInterval<1000:
166162
#Draw at most once a second
167163
print("[SERVICES] Can't draw more than once a second!")
168164
requestedInterval = 1000
169165

166+
if requestedInterval>=99999999:
167+
print("[SERVICES] No draw interval returned.")
168+
requestedInterval = -1
169+
170170
retVal = 0
171171

172172
if len(drawCallbacks)>0 and requestedInterval>=0:

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