Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page change problem and colors #15

Open
boromyr opened this issue Jun 22, 2021 · 12 comments
Open

Page change problem and colors #15

boromyr opened this issue Jun 22, 2021 · 12 comments

Comments

@boromyr
Copy link

boromyr commented Jun 22, 2021

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);
}
@mrQzs
Copy link
Collaborator

mrQzs commented Jun 23, 2021

@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.

@mrQzs
Copy link
Collaborator

mrQzs commented Jun 23, 2021

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.

@boromyr
Copy link
Author

boromyr commented Jun 23, 2021

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!

battery
menu

@mrQzs
Copy link
Collaborator

mrQzs commented Jun 23, 2021

@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.

@mrQzs mrQzs pinned this issue Jun 23, 2021
@boromyr
Copy link
Author

boromyr commented Jun 24, 2021

An extremely basic test.
test.zip

@mrQzs
Copy link
Collaborator

mrQzs commented Jun 26, 2021

@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.

@mrQzs
Copy link
Collaborator

mrQzs commented Jun 26, 2021

@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.
testt

@boromyr
Copy link
Author

boromyr commented Jun 26, 2021

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?

@mrQzs
Copy link
Collaborator

mrQzs commented Jun 27, 2021

@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?

@boromyr
Copy link
Author

boromyr commented Jun 27, 2021

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

@mrQzs
Copy link
Collaborator

mrQzs commented Jun 29, 2021

@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?

@mrQzs
Copy link
Collaborator

mrQzs commented Jul 2, 2021

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants