Skip to content

Commit 0081cec

Browse files
authored
Fix ifdef statement after ST7796 merge to resolve screen color issues (#8796)
1 parent 94db350 commit 0081cec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/graphics/Screen.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,14 @@ Screen::Screen(ScanI2C::DeviceAddress address, meshtastic_Config_DisplayConfig_O
356356
#else
357357
dispdev = new ST7789Spi(&SPI1, ST7789_RESET, ST7789_RS, ST7789_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT);
358358
#endif
359-
#elif defined(USE_ST7796)
359+
#if defined(USE_ST7796)
360360
#ifdef ESP_PLATFORM
361361
dispdev = new ST7796Spi(&SPI1, ST7796_RESET, ST7796_RS, ST7796_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT, ST7796_SDA,
362362
ST7796_MISO, ST7796_SCK, TFT_SPI_FREQUENCY);
363363
#else
364364
dispdev = new ST7796Spi(&SPI1, ST7796_RESET, ST7796_RS, ST7796_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT);
365365
#endif
366+
#endif
366367
#if defined(USE_ST7789)
367368
static_cast<ST7789Spi *>(dispdev)->setRGB(TFT_MESH);
368369
#elif defined(USE_ST7796)

0 commit comments

Comments
 (0)