XuNeo / luavgl

lua + lvgl = luavgl An optimized lvgl Lua binding
MIT License
70 stars 14 forks source link

I tried to set up a Luavgl environment in Visual Studio, and the basic environment has been started. Below are the results of several tests. Can you help me answer any questions? #72

Open jinsc123654 opened 1 month ago

jinsc123654 commented 1 month ago

Introduce the problem

visual studio 2022+lvgl9.3.0dev+lua5.3.4

The screenshot below shows the result of running the Lua routine. You can see that some routines are abnormal. What could be the reason for these exceptions? Is it caused by the file system path of Windows?

examples.lua image keyboard.lua image gesture image objid image font image uservalue image roller image dropdown image extension image fs image indev image group image protectedcall image

During compilation, this code cannot be compiled properly in some compilers. I have made the following modifications. image

image

jinsc123654 commented 1 month ago

I modified some of the code and changed the file system path. This is my latest running result. Can you help answer why some routines cannot run. Thank you very much!!

personal advice

luaL_newstate:Can you use lvgl's memory management and exception throwing functions when creating a Lua runtime environment

animation

image

declarative

image

pointer

image analogTime image

userdata

image

flappyBird/flappyBird

This routine will cause the window to fail to respond on Win10 image

uservalue

image

extension

image

fs:

(This routine suggests creating a file first and then opening it) image image

jinsc123654 commented 1 month ago

现在测试lua的时候,又遇到一个问题 就是直接require("gesture")时,会出现下方错误,经过测试,只有手势检测会出现这个错误,(换成local indev = lvgl.indev.get_next()后,虽然不会报错,但是也无法正确捕捉输入设备的手势)。点击的回调可以正常触发 image

XuNeo commented 1 month ago

Hi, after migrating to LVGL v9, the gesture stops working. I haven't got time to fix it yet.

For other issues you mentioned, they are mainly issues of the image path. LVGL can use posix or stdio interface. Could you check simulator/lv_conf.h to match windows configuration? You can follow the settings for lvgl simulator.

Make sure EXPOSE_WIDGET_API is enabled in order for the declarative example to work.

On the other hand, lvgl-v8 branch is more stable than master. You may try it too.

jinsc123654 commented 1 month ago

May I ask if Lua can provide canvas operations in LVGL8 lv_canvas_blur_hor lv_canvas_blur_ver

Message ID: @.***>

XuNeo commented 1 month ago

May I ask if Lua can provide canvas operations in LVGL8 lv_canvas_blur_hor lv_canvas_blur_ver

It can, but currently the API is missing in LUA. The whole canvas widget is not available but can be easily added following examples of image etc.

jinsc123654 commented 1 month ago

May I ask if Lua can provide canvas operations in LVGL8 lv_canvas_blur_hor lv_canvas_blur_ver

It can, but currently the API is missing in LUA. The whole canvas widget is not available but can be easily added following examples of image etc. I want to use Luavgl to implement such functionality image

XuNeo commented 1 month ago

Hi @jinsc123654 I added basic canvas support in https://github.com/XuNeo/luavgl/pull/73, but I suspect it will be a long way to support all draw dsc.

The best workaround I can think of is to generate a pre-blurred image.