-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Labels
bugSomething isn't workingSomething isn't working
Description
On the 1732S019N (ST7789 170x320), rotation 0 and 180 work properly, but 90 and 270 result in garbage thin horizontal dotted lines on the screen.
I'm using the lines from your sample code:
smartdisplay_init();
//__attribute__((unused)) auto disp = lv_disp_get_default();
lv_disp_set_rotation(disp, LV_DISP_ROTATION_90);
// lv_disp_set_rotation(disp, LV_DISP_ROTATION_180);
// lv_disp_set_rotation(disp, LV_DISP_ROTATION_270);
ui_init();
antlanc7
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Projects
Milestone
Relationships
Development
Select code repository
Activity
rzeldent commentedon Feb 8, 2025
Are you using the demo?
It the dimensions might be out of bounds and this might result in writing outside the buffer (this creating strange images)...
antlanc7 commentedon Mar 20, 2025
I reproduced this too.
The bug seems to be correlated with the
DISPLAY_GAP_X
andDISPLAY_GAP_Y
defines in the board file. The board definition is in vertical mode (height > width) and setsDISPLAY_GAP_X=35
andDISPLAY_GAP_Y=0
.If you want to use it in horizontal mode you have to swap the gaps, setting
DISPLAY_GAP_X=0
andDISPLAY_GAP_Y=35
. Then in the app code you can setlv_disp_set_rotation(disp, LV_DISP_ROTATION_90)
orlv_disp_set_rotation(disp, LV_DISP_ROTATION_270)
and it will work correctly.This is not ideal, maybe a solution could be to implement a custom rotation function that also sets the gaps with the function
esp_lcd_panel_set_gap
in the swapped order if the chosen orientation is 90 or 270.GeoffWebster commentedon Jul 3, 2025
Any progress on this as I have the same problem. Workaround from antlanc7 didn't fix it for me.
GeoffWebster commentedon Jul 4, 2025
antlanc7' workaround didn't work for me (see previous post) but using his workaround as a clue, I came up with working display for 90 deg and 270 deg by using "'-D DISPLAY_GAP_X=-20'", "'-D DISPLAY_GAP_Y=35'".
antlanc7 commentedon Jul 4, 2025
Yeah it depends on the specific display you have.
GeoffWebster commentedon Jul 4, 2025
These values work with the built-in display (170 x 240) of the ESP32-1732S019N board, the same one that started the ball rolling on this bug report