LVGL Ver.9 setup, specifically buffers....
I've been working with LGVL ver9 on a 4" CYD, and (after much work) everything is running well.
But the end goal was to move onto the Elecrow 7" hmi display. I though it would be about the same....
I can't go back in lvgl versions, because I do not fancy having to learn all new (old) commands. I've got enough confusion points as it is.
So, does anybody have any working setup code for lvgl 9 on one of these displays? I finally got it to where it would compile without blowing up, but when I load it, it just resets continuously. It looks to be right at where the buffers are created after the "display" is created.
I have:
// disp = (SCREEN_WIDTH, SCREEN_HEIGHT, draw_buf, sizeof(draw_buf));
static uint8_t buf[800 * 480 / 10 * 2];
lv_display_t * disp = lv_display_create(800, 480);
Serial.print("display created");
lv_display_set_buffers(disp, buf, NULL, 76800, LV_DISPLAY_RENDER_MODE_PARTIAL);
Which is about as simple as I can get. There's no option in the lvgl_conf.h file for display chip settings (as there are for the smaller CYDs)
(even if I create buf1 and buf2, being the same setup, and use two buffers instead of the NULL, it still blows up, so that's not it)
Any help would be much appreciated. I've been fighting lvgl for weeks now. And Squareline only supports upto version 8 something, so that's not an option.
Comments
Never mind, I got it. There's still a couple of issues with the touch screen. I get several errors after "wire.h" is started up,
[ 821][E][Wire.cpp:159] begin(): Bus already started in Master Mode.
[ 821][E][esp32-hal-gpio.c:95] __pinMode(): Invalid pin selected
[ 823][E][esp32-hal-gpio.c:95] __pinMode(): Invalid pin selected
E (694) gpio: gpio_set_level(226): GPIO output gpio_num error
E (700) gpio: gpio_set_level(226): GPIO output gpio_num error
E (715) gpio: gpio_set_level(226): GPIO output gpio_num error
E (716) gpio: gpio_set_level(226): GPIO output gpio_num error
E (721) gpio: gpio_set_level(226): GPIO output gpio_num error
[ 907][E][esp32-hal-gpio.c:95] __pinMode(): Invalid pin selected
I'm not sure what it's seeing, or using. I double checked the pin defs in touch.h and GFX_.h, and they're correct per the schematic I have.
Plus the touch screen is a bit weird, X0,Y0 should be in the upper left corner of the screen. When I instruct lvgl to draw a button in the upper left, that's where it puts it. But the touch XY, the zero point is the lower right. This works (for some reason) in lvgl, you can operate the button in the correct place. If you change the setting so 0,0 is the upper left, the button is still located in the upper right, but the operation (button press) is down at the bottom right.
I mean, it works, so I don't really care, but I would like to have it working "correctly".
Dear MicroGuy,
The sample programs we provide are only compatible with lvgl version 8.x.x, not version 9. We apologize, but you'll have to investigate this issue yourself.
We apologize for any inconvenience this may cause.
Thanks!
Best regards,