Fix display 0 measurements on boot

This commit is contained in:
samuelbles07
2025-02-01 13:52:12 +07:00
parent 4534f7319a
commit 154f3ecf8a

View File

@ -268,15 +268,17 @@ void setup() {
oledDisplay.setBrightness(configuration.getDisplayBrightness());
}
// Update display and led bar after finishing setup to show dashboard
updateDisplayAndLedBar();
// Reset display and post schedulers to make sure measurements value already available
dispLedSchedule.update();
agApiPostSchedule.update();
}
void loop() {
/** Handle schedule */
/** Run schedulers */
dispLedSchedule.run();
configSchedule.run();
agApiPostSchedule.run();
watchdogFeedSchedule.run();
if (configuration.hasSensorS8) {
co2Schedule.run();
@ -310,15 +312,13 @@ void loop() {
}
}
watchdogFeedSchedule.run();
/** Check for handle WiFi reconnect */
wifiConnector.handle();
/** factory reset handle */
factoryConfigReset();
/** check that local configura changed then do some action */
/** check that local configuration changed then do some action */
configUpdateHandle();
/** Firmware check for update handle */