Closed
Description
I've attempted to build against LVGL v9.2.0 and while it compiles, I get an error thrown at runtime from code like:
def HomeBtnBlockB_eventhandler(event_struct):
event = event_struct.code
if event == lv.EVENT.CLICKED and True:
print("clicked")
ui_HomeBtnBlockB = lv.imagebutton(ui_Home)
ui_HomeBtnBlockB.add_event_cb(HomeBtnBlockB_eventhandler, lv.EVENT.ALL, None)
The add_event_cb()
function throws:
Traceback (most recent call last):
File "app.py", line 23, in <module>
File "lvgl/demo1/export/ui.py", line 227, in <module>
SyntaxError: Cannot convert 'function' to pointer!
In the generated lv_mpy.c
the error is thrown by:
event_cb = mp_to_ptr()
won't accept a function, the exception is thrown from
lv_binding_micropython/gen/gen_mpy.py
Line 1355 in 96d6d35
I've bisected lvgl and narrowed down this change in behavior to lvgl/lvgl@1d14386b
Before this it works fine.
Metadata
Metadata
Assignees
Labels
No labels