I hope someone can assist with refreshing a canvas buffer from camera data. I am fetching a buffer from a camera in RGB565 format, as below.
scr = lv.obj()
canvas = lv.canvas(scr)
buf = camera.capture()
canvas.set_buffer(buf, 240, 240, lv.img.CF.TRUE_COLOR)
lv.scr_load(scr)
If I wish to update the buffer, the updates are not displayed, for example.
for x in range(10):
buf = camera.capture()
canvas.set_buffer(buf, 240, 240, lv.img.CF.TRUE_COLOR)
canvas.invalidate()
time.sleep(1)
I tried using an img widget as opposed to a canvas widget but was unable to get the buffer to display in the img widget. Any assistance would be great! Thank you.