Description
I used SquareLine IDE to create a project. Everything was working perfectly, until I added a bitmap image to the background. The screen dsiplays the image perfectly well, but now the GUI seems to jump around every second or so.
What MCU/Processor/Board and compiler are you using?
ESP32 S3, 8048S043 - 4.3inch LCD with Capacative Touch TFT
What LVGL version are you using?
8.3.7
What do you want to achieve?
Stable image render, with no jumping image. I am using platformio with Visual Studio Code, and the Arduino framewok (not expressif ).
What have you tried so far?
I tried with no background image, but as soon as I add an image (tried several images), the screen render jumps around. Note the screen supports 24 bits per pixel color format.
Code to reproduce
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like:
#define LV_ATTRIBUTE_MEM_ALIGN
const LV_ATTRIBUTE_MEM_ALIGN uint8_t ui_img_br_bmp_24bpp_png_data[] = {
0xC5,0x30,0xC5,0x30,0xC5,0x30,0xC5.......
};
const lv_img_dsc_t ui_img_br_bmp_24bpp_png = {
.header.always_zero = 0,
.header.w = 800,
.header.h = 480,
.data_size = sizeof(ui_img_br_bmp_24bpp_png_data),
.header.cf = LV_IMG_CF_TRUE_COLOR,
.data = ui_img_br_bmp_24bpp_png_data
};
Then in screen_init function
ui_BackgroundImage = lv_img_create(ui_PCDisplayMain);
lv_img_set_src(ui_BackgroundImage, &ui_img_br_bmp_24bpp_png);
lv_obj_set_width(ui_BackgroundImage, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_BackgroundImage, LV_SIZE_CONTENT); /// 1
lv_obj_set_align(ui_BackgroundImage, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_BackgroundImage, LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(ui_BackgroundImage, LV_OBJ_FLAG_SCROLLABLE); /// Flags
my Arduino loop
void loop()
{
lv_timer_handler(); /* let the GUI do its work */
//every 200th loop
ui_update(timeLabelMemory, dateLabelMemory);
screen_update();
}
void screen_update()
{
//update all labels with dynamic data just read from wifi web service etc, an example....
lv_label_set_text_fmt(ui_GPUFanRevs, "%d", pc_data.GPUFanRevs);
}
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.