M5Stack blank screen

Hi @Carlos_Diaz

Landscape seems OK


Portrait not so much

Also in CMAKELists.txt root
include($ENV{IDF_PATH}/tools/cmake/project.cmake) breaks the build when using littlevgl as a sub-module
I commented that line out in order to get it to build

Hi,

Thanks for testing it.

In portrait mode the display should be oriented with the buttons on the side, like rotating it 90 degrees, anyway the result is wrong, I will try to find out why is that, meanwhile, can you try with 0x28 instead of 0x68 in https://github.com/littlevgl/lv_port_esp32/blob/900c1d18bd380d0f9c34dc1090fab8fe732e3000/components/lvgl_esp32_drivers/lvgl_tft/ili9341.c#L122

I got a ILI9341 based display, but I can test the new value until tonight.

About the line you had to comment out, I’ve added that info into the readme, in the Temporal workaround section.

Swap the default height and width in lv_conf.h:

#define LV_HOR_RES_MAX          (CONFIG_LVGL_DISPLAY_WIDTH)
#define LV_VER_RES_MAX          (CONFIG_LVGL_DISPLAY_HEIGHT)

I swap the height and width values in the menuconfig based on the display orientation (for now only on the M5Stack):

config LVGL_DISPLAY_WIDTH
    int "TFT display width in pixels." if LVGL_PREDEFINED_DISPLAY_NONE
default 480 if LVGL_PREDEFINED_DISPLAY_ERTFT0356 || LVGL_PREDEFINED_DISPLAY_ADA_FEATHERWING
    default 240 if LVGL_PREDEFINED_DISPLAY_M5STACK && LVGL_DISPLAY_ORIENTATION_PORTRAIT
    default 320 if LVGL_PREDEFINED_DISPLAY_M5STACK && LVGL_DISPLAY_ORIENTATION_LANDSCAPE
default 480 if LVGL_PREDEFINED_DISPLAY_ERTFT0356
default 480 if LVGL_PREDEFINED_DISPLAY_ADA_FEATHERWING
default 320

config LVGL_DISPLAY_HEIGHT
    int "TFT display height in pixels." if LVGL_PREDEFINED_DISPLAY_NONE
    default 320 if LVGL_PREDEFINED_DISPLAY_M5STACK && LVGL_DISPLAY_ORIENTATION_PORTRAIT
    default 240 if LVGL_PREDEFINED_DISPLAY_M5STACK && LVGL_DISPLAY_ORIENTATION_LANDSCAPE
default 320 if LVGL_PREDEFINED_DISPLAY_ERTFT0356
default 320 if LVGL_PREDEFINED_DISPLAY_ADA_FEATHERWING
    default 240

Do you think we should do in other way?

Last night I was able to configure the display of the Wrover kit v4 in two different orientations and realized that in fact there are 4 possible orientations, so I wanted to ask you guys how would you name those orientations, should we use the display connector as reference point?

I have pushed the new commit so yall can see were I made the changes for it.