Skip to content

Commit

Permalink
Honor TFT_MESH color if defined for Heltec T114 or T190
Browse files Browse the repository at this point in the history
  • Loading branch information
todd-herbert committed Sep 20, 2024
1 parent 85d7222 commit 86f48e1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/graphics/Screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,13 @@ void Screen::setup()
static_cast<SH1106Wire *>(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<ST7789Spi *>(dispdev)->setRGB(TFT_MESH);
#endif
#endif

// Initialising the UI will init the display too.
ui->init();

Expand Down Expand Up @@ -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<TFTDisplay *>(dispdev)->flipScreenVertically();
#elif defined(USE_ST7789)
static_cast<ST7789Spi *>(dispdev)->flipScreenVertically();
#else
dispdev->flipScreenVertically();
#endif
Expand Down

0 comments on commit 86f48e1

Please sign in to comment.