LVGLBuilder
LVGLBuilder copied to clipboard
Page change problem and colors
Hi, first of all congratulations for the software, it's beautiful. I wanted to report some problems that I am finding, even if the software is still in beta and it is normal that there is a few bugs.
I tried to create two screens with some test widgets, setting a simple page change from 1 to 2 and 2 to 1, in the simulator the page change takes place correctly, but in the TFT this does not happen, and crashes to the gearbox page.
Event_1#Clicked#Change Screen#Page_2#None#150#0#
On some "Button Image" colors are reversed if converted via LVGLBUILDER (from .png to .c RGB565), others are seen correctly. I made a counter-finder to convert an image from the LVGL website, and the colors are respected.
MCU:ESP32; Framework: Arduino; IDE: PlatformIO VSCode; OS: Windows 10 x64; TFT: TouchScreen, SPI, ILI9341, 16bit; Driver: TFT_eSPI; LVGL 7.11.0; Code from LVGL_ARDUINO used:
/* Display flushing */
void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p) {
uint32_t w = (area->x2 - area->x1 + 1);
uint32_t h = (area->y2 - area->y1 + 1);
tft.startWrite();
tft.setAddrWindow(area->x1, area->y1, w, h);
tft.pushColors((uint16_t *)&color_p->full, w * h, true);
tft.endWrite();
lv_disp_flush_ready(disp);
}
@boromyr You mean the code generated by LBVGLBuilder crashed on the embedded device, right? Also, do you send me the pictures that cannot be converted correctly? I need to test and fix this problem.
https://github.com/mrQzs/Lvgl_Simulator
@boromyr Because I don't have this embedded hardware now, I can't find out the reason. But if the exported code can run on the lvgl simulator, it may be other problems.
The battery image works correctly, the other changes the color from blue to orange. White can be seen in all cases correctly. Ok I'll try on the simulator and let you know !! Thank you!
@boromyr Well, I will fix this problem as soon as I have time. As for another question, if there is an export code for my reference, I should be able to find the problem.
An extremely basic test. test.zip
@boromyr I read the code. Is the exported code incomplete?If there are multiple pages, you need to export the code for each page. I will add the function of exporting all page codes later.
@boromyr At present, there is no problem in the code logic. The effect is that page1 jumps to page1. I changed it to page1 to jump to page2.
Then I guess the exported code was wrong, surely I forgot to save. Before loading the firmware, I had started the simulation in LVGLBuilder, and it worked. The colours are alternating also in the simulator, so it is not a problem that depends on me?
@boromyr A little embarrassed, because I still do not understand what you are experiencing specific problems. Is there a problem with the export function or a problem with the compiled code after the export?
The problem is that the screen crashes when I try to change pages via a button. The configuration of the code was correct, I made a mistake in sending the files. This is the correct code. src.zip
@boromyr I tested the code ,it can run normally. You mean the program crashes when the page jumps during the simulation run, right? Do you remember the steps to reproduce the problem?
@boromyr The current program's image conversion is to directly convert png to RGB565, and some images require rgb565+alpha to display correctly。 Later I will add more conversion format options, and add color depth options when creating new projects.