Skip to content

Commit d00b4a6

Browse files
committed
Hmm, seems to work :)
1 parent 2fa3b1a commit d00b4a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

esp32/modules/services.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,15 @@ def draw_timer_callback(tmr):
188188
drawCallback(False) # Prepare draw
189189

190190
newDrawCallbacks = drawCallbacks
191-
for cb in drawCallbacks:
191+
for i in range(0, len(drawCallbacks)):
192+
cb = drawCallbacks[i]
192193
rqi = 0
193194
try:
194195
[rqi, space_used] = cb(y)
195196
y = y - space_used
196197
except BaseException as msg:
197198
print("[SERVICES] Exception in service draw: ", msg)
198-
newDrawCallbacks.pop(cb)
199+
newDrawCallbacks.pop(i)
199200
continue
200201
if rqi>0 and rqi<requestedInterval:
201202
# Service wants to loop again in rqi seconds
@@ -237,4 +238,3 @@ def force_draw(disableTimer):
237238
y = y - space_used
238239
except BaseException as msg:
239240
print("[SERVICES] Exception in service draw: ", msg)
240-
newDrawCallbacks.pop(cb)

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