Skip to content

Commit 95b8930

Browse files
Still hangs
1 parent 5779ae0 commit 95b8930

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

c_mpos/src/webcam.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#define WIDTH 640
1515
#define HEIGHT 480
16-
#define NUM_BUFFERS 4
16+
#define NUM_BUFFERS 1
1717
#define OUTPUT_WIDTH 240
1818
#define OUTPUT_HEIGHT 240
1919

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,12 @@ def init_cam():
236236
#webcam.recapture_frame(cam)
237237
bytes_obj = bytes(memview)
238238
print(f"got bytes: {len(bytes_obj)}")
239-
image_dsc.data = bytes_obj
240-
#image_dsc.data = static_bytes_obj
239+
#image_dsc.data = bytes_obj
240+
image_dsc.data = static_bytes_obj
241241
time.sleep_ms(200) # Allow for the MicroPython REPL to still work. Reducing it doesn't seem to affect the on-display FPS.
242242
# somehow, everything's fine until I tell LVGL to redraw the image:
243-
image.invalidate()
244-
#image.set_src(image_dsc)
243+
#image.invalidate()
244+
image.set_src(image_dsc)
245245
print("App backgrounded, deinitializing camera...")
246246
if use_webcam:
247247
webcam.deinit(cam) # Deinitializes webcam

0 commit comments

Comments
 (0)