Hello everyone:
the following is my description of the problem, I hope everyone can help to solve this problem, thank you very much
Description
What MCU/Processor/Board and compiler are you using?
ESP32+Linux
What do you experience?
littlevgl version:5.30
There are three types of interfaces in the product:
1. Message interface: Create a message object directly on the screen parent object, other child objects depend on this parent object, delete the parent object after leaving the interface
2. Device interface:Created directly on the screen parent object, not destroyed
3. Scene interface: Create a message object directly on the screen parent object, other child objects depend on this parent object, delete the parent object after leaving the interface
Interface switching sequence:
Scenario-> device1-> device2-> device3-> scenario
Problem Description:
Press the button at normal time to switch the interface. Occasionally, extra things will refresh in the upper left corner of the scene interface. These things are not what I want
These abnormal objects are all things in my scene interface, but the display in other places is affected.
What do you expect?
I hope to solve or avoid this problem
Code to reproduce
There are more codes and more objects are involved, which cannot be copied, please understand
//Screen parent object generation
static void Display_Cht_Creat_Screen(void)
{
windows_background = lv_obj_create(lv_scr_act(),NULL);
// windows_background = lv_obj_create(NULL,NULL);
lv_style_copy(&style_windows_background, &lv_style_plain);
style_windows_background.body.main_color = BACK_GROUND_COLOR;
style_windows_background.body.grad_color = BACK_GROUND_COLOR;
style_windows_background.body.opa = LV_OPA_100;
lv_obj_set_size(windows_background, 240, 320);
lv_obj_set_pos(windows_background, 0, 0);
lv_obj_set_style(windows_background, &style_windows_background);
// vTaskDelay(pdMS_TO_TICKS(20));
Display_Cht_Show_Interface(windows_background);
// vTaskDelay(pdMS_TO_TICKS(20));
// UpdateSettingScreen();
// lv_obj_set_style(windows_background, &style_windows_background);
}
//After investigation, when the screen object is created, the word Nodata appears. After investigation, it is found that the lv_draw_img function is called. I don't know if it has anything to do with this.
void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask,
const void * src, const lv_style_t * style, lv_opa_t opa_scale)
{
if(src == NULL) {
LV_LOG_WARN("Image draw: src is NULL");
lv_draw_rect(coords, mask, &lv_style_plain, LV_OPA_COVER);
lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL);
return;
}
lv_res_t res;
res = lv_img_draw_core(coords, mask, src, style, opa_scale);
if(res == LV_RES_INV) {
LV_LOG_WARN("Image draw error");
lv_draw_rect(coords, mask, &lv_style_plain, LV_OPA_COVER);
lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL);
return;
}
}
Why can’t my other account (cuihaotian3@163.com) post any topic?