7" & 5" ESP32 Screen in portrait (Rotation)

I have both these screens but I'm struggling to use them in a 480x800 configuration. I can get it to work using LVGL software rotation but this runs at a very low 1 or 2 FPS. In LVGL manual it mentions software rotation requires a large overhead and this is what I'm experiencing.
In SquareLines studio my project is set to 480x800, designed as it would function on the screen.

Do you have any example of how to draw in portrait without using: disp_drv.sw_rotate = 1; ?
I like the screens and would like to purchase more if I can just get this working effectively.

// Initialize the display
lv_disp_drv_init(&disp_drv);
disp_drv.sw_rotate = 1;
disp_drv.rotated = LV_DISP_ROT_90;
disp_drv.hor_res = screenWidth; // Set width to screen width
disp_drv.ver_res = screenHeight; // Set height to screen height
disp_drv.flush_cb = my_disp_flush;
disp_drv.draw_buf = &draw_buf;
lv_disp_drv_register(&disp_drv);

Comments

  • Hello @LazyMcCrazy ,


    Currently, screen rotation can only be achieved through LVGL functions. Using the rotation provided by the lovyanGFX library will cause errors in the screen. However, you can use two bufs as buffers. In addition, you can also change the memory management function in the lv_conf.h file. To use psram's memory management functions, this can improve the frame rate

Sign In or Register to comment.