What MCU/Processor/Board and compiler are you using?
TTGO T-Watch 2020 / LVGL v7.0
What do you experience?
I created a small mario bros animation where the character jumps at regular interval. See the following video.
As you can see in the video, from time to time, the image gets dirty and white pixels are rendered around the character.
Any idea why this is happening?
What do you expect?
No random white noise around the images.
Code to reproduce
The code for rendering mario can be found here: https://github.com/wizche/ttgo-smb/blob/75df0a7e8fb3011f1353eb3817e7397935f53be9/src/mario.cpp#L14
Screenshot and/or video
I created a minimal firmware showing the issue: https://github.com/wizche/flickering-mario
The demo app switches the image each second, we see that at every switch some pixels stay dirty from previous bitmap.
Thanks a lot
I think it happened because you set
LV_COLOR_TRANSP color for the container of mario.
LV_COLOR_TRANSP is used only for chroma keyed images to decide which color should be rendered as transparent.
Making the mario container transparent (
LV_OPA_TRANSP) worked for me:
lv_obj_t *marioContainer = lv_cont_create(scr, NULL);
// lv_obj_add_style(marioContainer, LV_OBJ_PART_MAIN, &style);
static lv_style_t cont_style;
lv_style_set_bg_opa(&cont_style, LV_STATE_DEFAULT, LV_OPA_TRANSP);
lv_style_set_border_opa(&cont_style, LV_STATE_DEFAULT, LV_OPA_TRANSP);
Hi @kisvegabor, thanks for the suggestion, are u testing with the T-Watch 2020?
I did ur changes (and commited to the repository) but I keep getting the same issue.
Its kind of painful that I cannot include links in the post.
I added the video to the repository readme.
What site are you trying to link to? I may be able to add it to the exceptions list for new users. Links to most sites are disabled initially because we get a lot of bots trying to post junk.
I don’t think @kisvegabor has that hardware; that’s why he asked if you can reproduce it in the simulator.
I didnt tried in a simulator, but I suspect is related to the lvgl implementation for the twatch. But I dont get any updates in the issue I opened at the SDK github: https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library/issues/56
I wanted to include the github repository and youtube link in the repository README.
Both YouTube and GitHub are already in the whitelist… maybe it’s not allowing multiple links. I’ll look into it.
It turns out there are two settings that control links, and I only changed one of them last time. Adding the link should work now.
Turns out it was an issue in the LVGL implementation of the TTGO watch. Now its fixed, this can be closed.