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

[LVGL] bar with image background not showing on the esp32 but works in simulator #634

Open
petrubuciu opened this issue Nov 14, 2024 · 10 comments
Assignees
Labels

Comments

@petrubuciu
Copy link

Describe the bug
i dont know if is a bug or not. i have an image (png) and i put over the image 2 bars with image background to animate the image, work perfect in the simulator but i upload the firmware to my esp32 doesnt show anything only the first image. i tried to to move those bars in the widget structure on every possible position as a parent and children.

this is from eez studio:
Screenshot 2024-11-14 at 08 30 45
this are the widgets structure:
Screenshot 2024-11-14 at 08 31 42
and this is from my esp:
WhatsApp Image 2024-11-14 at 08 32 55

Desktop:

  • OS: MacOs Sonoma
  • Version 19.0

** LVGL version**

  • 9.2.2

if you need anything else please let me know and i will provide.

@mvladic
Copy link
Contributor

mvladic commented Nov 14, 2024

Did you forget to call ui_tick()? It must be called periodically - the best place is after lv_timer_handler or lv_task_handler call.

@petrubuciu
Copy link
Author

petrubuciu commented Nov 14, 2024

i call the lv_timer_handler(); and ui_tick(); if i dont call the ui_tick() the ui doesnt work

void IPS_ILI9488::DisplayUpdate()
{
lv_timer_handler();
ui_tick();
vTaskDelay(pdMS_TO_TICKS(5));
}

also if i put a normal bar(default) its work

@mvladic
Copy link
Contributor

mvladic commented Nov 14, 2024

Can you send me your eez-project file?

@petrubuciu
Copy link
Author

how can i send you? i dont want to put it here. thanks

@mvladic
Copy link
Contributor

mvladic commented Nov 14, 2024

You can send me as DM on Discord.

@petrubuciu
Copy link
Author

sent, thx

@mvladic
Copy link
Contributor

mvladic commented Nov 14, 2024

I compiled your project using "Emscripten + SDL" with LVGL 9.2.2 and it works there too. I only changed bitmaps format to RGB888.

Here is also a new project that has only Bar widgets like in your project. This also works in both simulator and in compiled code.

lvgl_test_anim.zip

lv_test_anim

Unfortunately, I don't have any ESP32 board where I can test your project with the LVGL 9.2.2. What board do you use? Is it custom board or some development board that can be bought?

@mvladic
Copy link
Contributor

mvladic commented Nov 14, 2024

Ups, sorry, I posted images from your project without asking you. I will delete it.

@petrubuciu
Copy link
Author

i will test now with rgb888 and report thx :)

@mvladic
Copy link
Contributor

mvladic commented Nov 15, 2024

I posted some findings to you as DM on Discord, but I think it also makes sense to post it here so anybody can see it. So, here it is:

I have this board https://github.com/lvgl/lv_port_renesas_rx72n-envision-kit which also has 16bit (RGB565) display, so I wanted to try this Bar animation test project. This is Renesas board that uses some kind of 2D graphics acceleration called Dave2D. With that acceleration enabled there are all kind of problems and I never managed, no matter what I tried, to run without problems this project (problems like not getting the expected result or even crashing). But, when I finally disabled Dave2D in lv_conf.h it suddenly started to work without any problem. I set all the images to RGB565A8 format. A8 is required because images must have an alpha channel because without it recoloring will not work. Here is how it looks:

video.mp4

Even this Renesas board doesn't have anything in common with your ESP32 based board, except it also has 16 bit display, I wanted to share these findings with you because obviously not all drawing libraries works in LVGL even though they are part of LVGL. Dave2D can be found here in LVGL repository:

image

I suppose, without Dave2D, software rendering is used which can be found here:

image

Here is my eez-project that works on Renesas board:

lvgl_test_bar_animations.zip

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

No branches or pull requests

2 participants