Skip to content

Commit 171865a

Browse files
briefly enabling/disabling the th seems to work
1 parent 09caa4c commit 171865a

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

  • internal_filesystem/apps/com.example.camtest/assets

internal_filesystem/apps/com.example.camtest/assets/camtest.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def init_cam():
259259
snap_button.remove_flag(lv.obj.FLAG.HIDDEN)
260260

261261
# Task handler needs to be updated from this app's thread, otherwise it causes concurrency issues
262-
th.disable()
262+
#th.disable()
263263
#time.sleep_ms(500)
264264

265265
while appscreen == lv.screen_active() and keepgoing is True:
@@ -270,11 +270,13 @@ def init_cam():
270270
status_label_cont.remove_flag(lv.obj.FLAG.HIDDEN)
271271
else:
272272
status_label_cont.add_flag(lv.obj.FLAG.HIDDEN)
273-
lv.task_handler()
273+
#lv.task_handler()
274274
time.sleep_ms(5)
275-
lv.tick_inc(5)
275+
#lv.tick_inc(5)
276276
if cam:
277+
th.disable()
277278
try_capture()
279+
th.enable()
278280

279281
print("camtest.py: stopping...")
280282

@@ -286,5 +288,5 @@ def init_cam():
286288

287289
print("camtest.py: showing launcher...")
288290
show_launcher()
289-
th.enable()
291+
#th.enable()
290292

0 commit comments

Comments
 (0)