mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-30 17:07:16 +02:00
Fix display 0 measurements on boot
This commit is contained in:
@ -268,15 +268,17 @@ void setup() {
|
|||||||
oledDisplay.setBrightness(configuration.getDisplayBrightness());
|
oledDisplay.setBrightness(configuration.getDisplayBrightness());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update display and led bar after finishing setup to show dashboard
|
// Reset display and post schedulers to make sure measurements value already available
|
||||||
updateDisplayAndLedBar();
|
dispLedSchedule.update();
|
||||||
|
agApiPostSchedule.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
/** Handle schedule */
|
/** Run schedulers */
|
||||||
dispLedSchedule.run();
|
dispLedSchedule.run();
|
||||||
configSchedule.run();
|
configSchedule.run();
|
||||||
agApiPostSchedule.run();
|
agApiPostSchedule.run();
|
||||||
|
watchdogFeedSchedule.run();
|
||||||
|
|
||||||
if (configuration.hasSensorS8) {
|
if (configuration.hasSensorS8) {
|
||||||
co2Schedule.run();
|
co2Schedule.run();
|
||||||
@ -310,15 +312,13 @@ void loop() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watchdogFeedSchedule.run();
|
|
||||||
|
|
||||||
/** Check for handle WiFi reconnect */
|
/** Check for handle WiFi reconnect */
|
||||||
wifiConnector.handle();
|
wifiConnector.handle();
|
||||||
|
|
||||||
/** factory reset handle */
|
/** factory reset handle */
|
||||||
factoryConfigReset();
|
factoryConfigReset();
|
||||||
|
|
||||||
/** check that local configura changed then do some action */
|
/** check that local configuration changed then do some action */
|
||||||
configUpdateHandle();
|
configUpdateHandle();
|
||||||
|
|
||||||
/** Firmware check for update handle */
|
/** Firmware check for update handle */
|
||||||
|
Reference in New Issue
Block a user