Open sjgcornish opened 2 months ago
Thanks for the tip... I managed to get the lvgl_port_v8 demo working, but following your instructions I ended up with a compilation error: undefined reference to `ui_Screen1_screen_init' I've tried a couple things but am not familiar enough yet with ardunio to really understand it all.
Ok, I figured it out and it looks like it's going to work nicely... Doing what you say, copying all ui generated files into the projects root directory, and also adding #include "screens/ui_Screen1.c" and all other screens you may have to the ui.c file after the screen variable declarations.
I am pleased that you where success full. I have found a few problems where the generated code has not been compatible with lvgl 8.4 but that is easy to fix. However SquareLIne are no longer officially supported by LVGL which is a shame. Apart from that what I do now is to use Squareline to generate the widgets I want then cut and paste the code into my application and treat every screen as a new "tab" i.e. .ino file in the Arduino project. Create every screen in setup then you can change screens just by adding e.g.
lv_scr_load(settings_screen);
lv_scr_act();
in button event.
This does mean all screens are held in memory but the ESP32 has plenty of that. I found that when trying to close(delete) screens an recreating them each time was slow and resulted in tearing during the change over.
Used the lvgl_port_v8 template to create an Arduino project.
Created a simple Squareline project select Expreesif with the ESP32-S3-LCD_EV_BOARD.
Copied the exported file to the Arduino project #include
placed ui_init(); between lvgl_port_lock(-1); and lvgl_port_unlock();
I also had to copied the screens from the screens folder to the Arduino project (I need to work out how to include the folder).
I hope this helps someone.