From 86f48e1615b74f25983c7da2d40a6e3b3c00548d Mon Sep 17 00:00:00 2001 From: Todd Herbert Date: Fri, 20 Sep 2024 17:18:43 +1200 Subject: [PATCH] Honor TFT_MESH color if defined for Heltec T114 or T190 --- src/graphics/Screen.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index ae09ee408a..49d69dff3d 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -1670,6 +1670,13 @@ void Screen::setup() static_cast(dispdev)->setSubtype(7); #endif +#ifdef USE_ST7789 +// Heltec T114 and T190: honor a custom text color, if defined in variant.h +#ifdef TFT_MESH + static_cast(dispdev)->setRGB(TFT_MESH); +#endif +#endif + // Initialising the UI will init the display too. ui->init(); @@ -1726,6 +1733,8 @@ void Screen::setup() #if defined(ST7701_CS) || defined(ST7735_CS) || defined(ILI9341_DRIVER) || defined(ST7701_CS) || defined(ST7789_CS) || \ defined(RAK14014) || defined(HX8357_CS) static_cast(dispdev)->flipScreenVertically(); +#elif defined(USE_ST7789) + static_cast(dispdev)->flipScreenVertically(); #else dispdev->flipScreenVertically(); #endif