From 86f48e1615b74f25983c7da2d40a6e3b3c00548d Mon Sep 17 00:00:00 2001 From: Todd Herbert Date: Fri, 20 Sep 2024 17:18:43 +1200 Subject: [PATCH 1/3] 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 From c3401683b03c75beb826a21273c057c3b72a9272 Mon Sep 17 00:00:00 2001 From: Todd Herbert Date: Fri, 20 Sep 2024 17:22:53 +1200 Subject: [PATCH 2/3] Temporary: point lib_deps at fork of Heltec's ST7789 library For demo only, until ST7789 is merged --- variants/heltec_mesh_node_t114/platformio.ini | 2 +- variants/heltec_vision_master_t190/platformio.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/variants/heltec_mesh_node_t114/platformio.ini b/variants/heltec_mesh_node_t114/platformio.ini index e0d8ca0cc7..08745f7d9f 100644 --- a/variants/heltec_mesh_node_t114/platformio.ini +++ b/variants/heltec_mesh_node_t114/platformio.ini @@ -14,4 +14,4 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/heltec_mesh_node lib_deps = ${nrf52840_base.lib_deps} lewisxhe/PCF8563_Library@^1.0.1 - https://github.com/meshtastic/st7789#7181320e7ed05c7fb5fd2d32f14723bce6088b7b \ No newline at end of file + https://github.com/todd-herbert/meshtastic-st7789-heltec#flip-and-color \ No newline at end of file diff --git a/variants/heltec_vision_master_t190/platformio.ini b/variants/heltec_vision_master_t190/platformio.ini index fd00014394..0aff74b0c5 100644 --- a/variants/heltec_vision_master_t190/platformio.ini +++ b/variants/heltec_vision_master_t190/platformio.ini @@ -9,5 +9,5 @@ build_flags = lib_deps = ${esp32s3_base.lib_deps} lewisxhe/PCF8563_Library@^1.0.1 - https://github.com/meshtastic/st7789#7181320e7ed05c7fb5fd2d32f14723bce6088b7b + https://github.com/todd-herbert/meshtastic-st7789-heltec#flip-and-color upload_speed = 921600 \ No newline at end of file From cceee5158d98947acd68f63c98f24da7e02adc03 Mon Sep 17 00:00:00 2001 From: Todd Herbert Date: Sat, 21 Sep 2024 01:15:58 +1200 Subject: [PATCH 3/3] Update lib_deps; tidy preprocessor logic --- src/graphics/Screen.cpp | 6 ++---- variants/heltec_mesh_node_t114/platformio.ini | 2 +- variants/heltec_vision_master_t190/platformio.ini | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 49d69dff3d..31f522a434 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -1670,11 +1670,9 @@ 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 +#if defined(USE_ST7789) && defined(TFT_MESH) + // Heltec T114 and T190: honor a custom text color, if defined in variant.h static_cast(dispdev)->setRGB(TFT_MESH); -#endif #endif // Initialising the UI will init the display too. diff --git a/variants/heltec_mesh_node_t114/platformio.ini b/variants/heltec_mesh_node_t114/platformio.ini index 08745f7d9f..1b06c7f5e3 100644 --- a/variants/heltec_mesh_node_t114/platformio.ini +++ b/variants/heltec_mesh_node_t114/platformio.ini @@ -14,4 +14,4 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/heltec_mesh_node lib_deps = ${nrf52840_base.lib_deps} lewisxhe/PCF8563_Library@^1.0.1 - https://github.com/todd-herbert/meshtastic-st7789-heltec#flip-and-color \ No newline at end of file + https://github.com/meshtastic/st7789#bd33ea58ddfe4a5e4a66d53300ccbd38d66ac21f \ No newline at end of file diff --git a/variants/heltec_vision_master_t190/platformio.ini b/variants/heltec_vision_master_t190/platformio.ini index 0aff74b0c5..0c504d62bb 100644 --- a/variants/heltec_vision_master_t190/platformio.ini +++ b/variants/heltec_vision_master_t190/platformio.ini @@ -9,5 +9,5 @@ build_flags = lib_deps = ${esp32s3_base.lib_deps} lewisxhe/PCF8563_Library@^1.0.1 - https://github.com/todd-herbert/meshtastic-st7789-heltec#flip-and-color + https://github.com/meshtastic/st7789#bd33ea58ddfe4a5e4a66d53300ccbd38d66ac21f upload_speed = 921600 \ No newline at end of file