From 6ba08d6ba0bd9f9d0118c122246c9c237ed99a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Metrich?= <45318189+FredM67@users.noreply.github.com> Date: Sun, 2 Jun 2024 19:49:38 +0200 Subject: [PATCH] 3 colors for temp --- Mk2_3phase_RFdatalog_temp/utils.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mk2_3phase_RFdatalog_temp/utils.h b/Mk2_3phase_RFdatalog_temp/utils.h index 5f3dd8a..9af3280 100644 --- a/Mk2_3phase_RFdatalog_temp/utils.h +++ b/Mk2_3phase_RFdatalog_temp/utils.h @@ -312,7 +312,8 @@ inline void printForSerialText() // Skip refresh if the temp didn't change tft.fillScreen(ST77XX_BLACK); - tft.setTextColor(tx_data.temperature_x100[0] > 5500 ? ST77XX_GREEN : ST7735_RED); + tft.setTextColor(tx_data.temperature_x100[0] > 5500 ? ST77XX_GREEN : tx_data.temperature_x100[0] < 4500 ? ST7735_RED + : ST7735_ORANGE); tft.setCursor(10, 52); tft.print(tx_data.temperature_x100[0] * 0.01F, 1); tft.drawCircle(tft.getCursorX() + 6, tft.getCursorY() - 28, 4, ST7735_WHITE);