I have upgraded to the 6.1.1 version of LVGL. the bug is still there but the 6.1 cover it up by setting the tabview button to pretty style. The code below will show the bug. Please try it in the simulator.
// place the buttons on the left side
lv_tabview_set_btns_pos(tabviewOnOff, LV_TABVIEW_BTNS_POS_LEFT);
// Add 2 tabs (the tabs are page (lv_page) and can be scrolled
tabThermostatOn = lv_tabview_add_tab(tabviewOnOff, “On”);
tabThermostatOff = lv_tabview_add_tab(tabviewOnOff, “Off”);
// the thermostat tab to ON or OFF
lv_tabview_set_tab_act(tabviewOnOff, 0, LV_ANIM_OFF);
static lv_style_t style1;
lv_style_copy(&style1, lv_tabview_get_style(tabviewOnOff , LV_TABVIEW_STYLE_BTN_BG)); // Copy a built-in style to initialize the new style
@Pablo2048 the driver seems to be causing this issue. Can you confirm it? Can you run your lvgl\Arduino in a simulator? I would not have picked the driver unless I don’t really know what the driver is. Is the driver this piece of code?
/* Display flushing */
void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p)
{
uint16_t c;
// Serial.printf("Flushing area: x1: %d, x2: %d, y1: %d, y2: %d\n", area->x1, area->x2, area->y1, area->y2);
tft.startWrite(); /* Start new TFT transaction */
tft.setAddrWindow(area->x1, area->y1, (area->x2 - area->x1 + 1), (area->y2 - area->y1 + 1)); /* set the working window */
for (int y = area->y1; y <= area->y2; y++) {
for (int x = area->x1; x <= area->x2; x++) {
c = color_p->full;
tft.writeColor(c, 1);
color_p++;
}
}
tft.endWrite(); /* terminate TFT transaction */
lv_disp_flush_ready(disp); /* tell lvgl that flushing is done */
}
Not sure how this code could map part of an image from another screen on to this page.
No, the driver is not piece of code. I’m using https://github.com/Bodmer/TFT_eSPI as an low level (and fast) driver. Can you please check your user_setup?