Add camera button

This commit is contained in:
Thomas Farstrike
2025-05-05 21:39:27 +02:00
parent d5aa2af5be
commit e607e1320b
@@ -48,6 +48,15 @@ cont.set_style_border_width(0, 0)
cont.set_size(lv.pct(100), lv.pct(100))
cont.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
button = lv.button(cont)
button.set_size(40, 40)
button.align(lv.ALIGN.RIGHT_MID, 0, -20)
def snap_button(e):
print("Picture taken!")
# TODO: keep it on-screen for a while, or save it to storage, or show it in miniature
button.add_event_cb(snap_button,lv.EVENT.CLICKED,None)
from camera import Camera, GrabMode, PixelFormat, FrameSize, GainCeiling