display: enable MADCTL X-mirror so ST7789 text reads correctly (panel variant scans mirrored)
This commit is contained in:
@@ -72,6 +72,10 @@ esp_err_t display_manager_init(void)
|
|||||||
ESP_ERROR_CHECK(esp_lcd_panel_reset(s_panel));
|
ESP_ERROR_CHECK(esp_lcd_panel_reset(s_panel));
|
||||||
ESP_ERROR_CHECK(esp_lcd_panel_init(s_panel));
|
ESP_ERROR_CHECK(esp_lcd_panel_init(s_panel));
|
||||||
ESP_ERROR_CHECK(esp_lcd_panel_invert_color(s_panel, true));
|
ESP_ERROR_CHECK(esp_lcd_panel_invert_color(s_panel, true));
|
||||||
|
/* This panel variant scans mirrored on X; flip so text reads correctly.
|
||||||
|
* If text appears upside-down instead, use mirror(false,true); if still
|
||||||
|
* mirrored both ways, use mirror(true,true). */
|
||||||
|
ESP_ERROR_CHECK(esp_lcd_panel_mirror(s_panel, true, false));
|
||||||
ESP_ERROR_CHECK(esp_lcd_panel_disp_on_off(s_panel, true));
|
ESP_ERROR_CHECK(esp_lcd_panel_disp_on_off(s_panel, true));
|
||||||
|
|
||||||
s_staging = malloc(DISP_W * sizeof(uint16_t));
|
s_staging = malloc(DISP_W * sizeof(uint16_t));
|
||||||
|
|||||||
Reference in New Issue
Block a user