Closed amirgon closed 2 years ago
Since I'm basing this on latest SDL LVGL driver, does it by any chance fix https://github.com/lvgl/lv_binding_micropython/issues/97?
I've just tested, and unfortunately, it does not. It must be some issue very specific to the threading environment/GC behavior of Micropython? I don't believe Nvidia open-sourced the OpenGL part of their driver stack, which is where the crash happens, so that won't be much help either.
Would keyboard work on the web simulator? How much effort is required to support this?
This should work out of the box or require very minimal changes. Emscripten supports using the keyboard with SDL so it just needs to be initialized.
@embeddedt After merging this and updating lv_micropython, do we expect the simulator to update automatically? so far, it seems that the new SDL is not available on the simulator:
>>> import SDL
>>> hasattr(SDL, 'keyboard_read')
False
@amirgon Thanks for letting me know, this is fixed now. https://github.com/lvgl/lv_micropython/commit/60e0d6953aa6c2002a32ccabaa0cdc71a52945cb
There was no build failure notification due to a GitHub limitation when merging branches.
this is fixed now. lvgl/lv_micropython@60e0d69
Great! I really missed that js also has its own makefile.
But I still don't see this on the simulator... Which job is supposed to actually deploy it?
Can you try clearing your browser cache? I see it here: https://sim.lvgl.io/v8.3/micropython/ports/javascript/index.html
I see it here: https://sim.lvgl.io/v8.3/micropython/ports/javascript/index.html
Aha!
https://sim.lvgl.io/ only lists versions up to 8.1...
Perhaps we can have only "latest" v8 version? I don't believe anyone would want to use v8.2 when v8.3 is available.
(but might still want to use v7 or v6)
Also.... I don't think keyboard work on the JS simulator.
It simply doesn't focus on the LVGL GUI, only on the editor/console.
@amirgon I'll look into this but it won't be for another week at least.
The core of the issue turned out to be very simple, unfortunately it took me about two hours to find these lines. :laughing: I've tested locally and I can type into an LVGL textarea now. The fix should be deployed within 20 minutes or so.
@embeddedt it works great!! Could you also update the https://sim.lvgl.io/ page? It has links to v8.0 and v8.1 but not to latest version. I think it's enough to have links to latest version of each major version instead. What do you think?
Sorry, I forgot to address your previous message. Updated.
Thanks @embeddedt, it's perfect!
Port SDL driver from lv_drivers into Micropython bindings instead of the existing (old) SDL driver.
This also adds keyboard support and supersedes https://github.com/lvgl/lv_binding_micropython/pull/211 (which seems to be abandoned?)
To run this - need to fix the Makefile on lv_micropython (this will be done after merging this PR):
@embeddedt - I would appreciate your comments!