Description
I express my deep gratitude for the wonderful library. My project sparkled with new colors and acquired new opportunities. Thank you! BUT there are a few annoying points.
Why is there no way to select a display driver at runtime? Flash size 4M (or larger) allows you to store multiple display driver code.
Only 1 display driver (touchscreen driver) is always available in a project. It is even spelled out at the CMakeLists.txt level.
Why is there no way to dynamically change the LV_HOR_RES_MAX
and LV_VER_RES_MAX
values depending on the display driver (for example, as an external variable)?
For example, for ILI9341
LV_HOR_RES_MAX
= 320, LV_VER_RES_MAX
= 240. And for ILI9488
LV_HOR_RES_MAX
= 480, LV_VER_RES_MAX
= 320.
There are many places in the lvgl
library as well as in the lvgl_esp32_drivers
files where the LV_HOR_RES_MAX
and LV_VER_RES_MAX
macros are used. E.g.
void lv_disp_drv_init(lv_disp_drv_t * driver)
{
_lv_memset_00(driver, sizeof(lv_disp_drv_t));
driver->flush_cb = NULL;
driver->hor_res = LV_HOR_RES_MAX;
driver->ver_res = LV_VER_RES_MAX;
driver->buffer = NULL;
driver->rotated = LV_DISP_ROT_NONE;
driver->sw_rotate = 0;
driver->color_chroma_key = LV_COLOR_TRANSP;
driver->dpi = LV_DPI;
....
}
When choosing a DARK
theme, the LIGHT
theme always remains.
Kconfig
choice LV_THEME_DEFAULT_FLAG
depends on LV_THEME_MATERIAL
prompt "Select theme default flag"
default LV_THEME_DEFAULT_FLAG_LIGHT
help
Select theme default flag
config LV_THEME_DEFAULT_FLAG_LIGHT
bool "Light theme"
config LV_THEME_DEFAULT_FLAG_DARK
bool "Dark theme"
endchoice
lv_conf_internal.h
#ifndef LV_THEME_DEFAULT_FLAG
# ifdef CONFIG_LV_THEME_DEFAULT_FLAG
# define LV_THEME_DEFAULT_FLAG CONFIG_LV_THEME_DEFAULT_FLAG
# else
# define LV_THEME_DEFAULT_FLAG LV_THEME_MATERIAL_FLAG_LIGHT
# endif
#endif
Initially I used the ILI9341
driver and the LV_COLOR_16_SWAP
option was selected in the menuconfig.
When the ILI9488
driver was selected, the color display on the screen was incorrect. I spent a lot of time and effort to understand the problem of disgusting color on the display. The color was broken due to the selected LV_COLOR_16_SWAP
option.
Of course, I can modify the source myself to fix these problems. But on the next update, everything will break again.