refactor(display): update ScreenState field names and remove time display

This commit is contained in:
2026-02-16 20:59:25 -08:00
parent 89f3248747
commit 7085bfff04

View File

@@ -196,7 +196,7 @@ int DisplayDriverGFX::height() { return _gfx ? _gfx->height() : DISPLAY_HEIGHT;
void DisplayDriverGFX::render(const ScreenState& state) {
if (!_gfx) return;
switch (state.screen) {
case ScreenID::BOOT_SPLASH: drawBoot(); break;
case ScreenID::BOOT: drawBoot(); break;
case ScreenID::DASHBOARD: drawDashboard(state); break;
case ScreenID::ALERT: drawAlert(state); break;
case ScreenID::OFF: drawOff(); break;
@@ -225,11 +225,10 @@ void DisplayDriverGFX::drawDashboard(const ScreenState& state) {
_gfx->println("KLUBHAUS DASHBOARD");
_gfx->setTextSize(2);
_gfx->setCursor(20, 80);
_gfx->printf("IP: %s", state.wifiIP);
_gfx->printf("IP: %s", state.ipAddr.c_str());
_gfx->setCursor(20, 110);
_gfx->printf("RSSI: %d dBm", state.wifiRSSI);
_gfx->printf("RSSI: %d dBm", state.wifiRssi);
_gfx->setCursor(20, 140);
_gfx->printf("Time: %s", state.timeString);
}
void DisplayDriverGFX::drawAlert(const ScreenState& state) {
@@ -241,7 +240,7 @@ void DisplayDriverGFX::drawAlert(const ScreenState& state) {
_gfx->println("DOORBELL!");
_gfx->setTextSize(3);
_gfx->setCursor(100, 280);
_gfx->println(state.alertMessage ? state.alertMessage : "Someone is at the door");
_gfx->println(state.alertBody ? state.alertBody : "Someone is at the door");
}
void DisplayDriverGFX::drawOff() {