Skip to content

Commit

Permalink
3 colors for temp
Browse files Browse the repository at this point in the history
  • Loading branch information
FredM67 committed Jun 2, 2024
1 parent 9d4fae9 commit 6ba08d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Mk2_3phase_RFdatalog_temp/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6ba08d6

Please sign in to comment.