refactor(display): improve touch handling and code formatting
This commit is contained in:
@@ -258,3 +258,13 @@ void DoorbellLogic::onSerialCommand(const String& cmd) {
|
||||
}
|
||||
else Serial.println(F("[CMD] alert|silence|reboot|dashboard|off|status"));
|
||||
}
|
||||
|
||||
void DoorbellLogic::setScreen(ScreenID s) {
|
||||
Serial.printf("[SCREEN] Set to %s\n", screenIdStr(s));
|
||||
_state.screen = s;
|
||||
|
||||
// Auto-manage backlight based on screen
|
||||
bool needsBacklight = (s != ScreenID::OFF);
|
||||
_display->setBacklight(needsBacklight);
|
||||
_state.backlightOn = needsBacklight;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ private:
|
||||
void flushStatus(const String& message);
|
||||
void heartbeat();
|
||||
void transition(DeviceState s);
|
||||
void setScreen(ScreenID s);
|
||||
String topicUrl(const char* base);
|
||||
|
||||
DisplayManager* _display;
|
||||
|
||||
Reference in New Issue
Block a user