snapshot
This commit is contained in:
@@ -7,6 +7,23 @@ void DisplayManager::begin() {
|
||||
|
||||
_tft.init();
|
||||
_tft.setRotation(1); // landscape: 480x320
|
||||
|
||||
// === DIAGNOSTIC: most basic text rendering ===
|
||||
_tft.fillScreen(TFT_BLUE);
|
||||
_tft.setTextColor(TFT_WHITE); // no background color arg
|
||||
_tft.setTextFont(1); // explicitly set GLCD font
|
||||
_tft.setTextSize(3);
|
||||
_tft.setCursor(10, 10); // absolute position, no datum
|
||||
_tft.print("HELLO");
|
||||
_tft.setCursor(10, 60);
|
||||
_tft.print("W:");
|
||||
_tft.print(_tft.width());
|
||||
_tft.setCursor(10, 110);
|
||||
_tft.print("H:");
|
||||
_tft.print(_tft.height());
|
||||
delay(5000);
|
||||
// === END DIAGNOSTIC ===
|
||||
|
||||
_tft.fillScreen(COL_BLACK);
|
||||
}
|
||||
|
||||
@@ -188,10 +205,19 @@ void DisplayManager::drawStatusScreen(const ScreenState& s) {
|
||||
s.deviceState == DeviceState::SILENT ? COL_GREEN : COL_NEON_TEAL;
|
||||
drawInfoLine(x, y, stCol, buf); y += sp;
|
||||
|
||||
if (strlen(s.alertMessage) > 0) {
|
||||
snprintf(buf, sizeof(buf), "Last: %.40s", s.alertMessage);
|
||||
drawInfoLine(x, y, COL_DARK_GRAY, buf); y += sp;
|
||||
// Recent alerts
|
||||
if (s.alertHistoryCount > 0) {
|
||||
drawInfoLine(x, y, COL_MINT, "Recent Alerts:"); y += sp;
|
||||
for (int i = 0; i < s.alertHistoryCount; i++) {
|
||||
uint16_t col = (i == 0) ? COL_YELLOW : COL_DARK_GRAY;
|
||||
snprintf(buf, sizeof(buf), "%s %.35s",
|
||||
s.alertHistory[i].timestamp,
|
||||
s.alertHistory[i].message);
|
||||
drawInfoLine(x, y, col, buf); y += sp;
|
||||
}
|
||||
} else {
|
||||
drawInfoLine(x, y, COL_DARK_GRAY, "No alerts yet"); y += sp;
|
||||
}
|
||||
|
||||
if (s.debugMode) {
|
||||
drawInfoLine(x, y, COL_YELLOW, "DEBUG MODE - _test topics");
|
||||
|
||||
Reference in New Issue
Block a user