Added fetch on boot

This commit is contained in:
Tomislav Kopić 2024-11-06 21:28:36 +01:00
parent ddf764b658
commit 67fda7c395

View File

@ -317,13 +317,11 @@ void setup(void) {
initSystems(); initSystems();
netman.start(); netman.start();
timeClient.begin(); timeClient.begin();
delay(500); fetchWeatherData();
timeClient.setTimeOffset(3600);
} }
void loop() { void loop() {
timeClient.update(); timeClient.update();
if (!is_display_off && (millis() - lastWeatherUpdate > weatherUpdateInterval)) { if (!is_display_off && (millis() - lastWeatherUpdate > weatherUpdateInterval)) {
fetchWeatherData(); fetchWeatherData();
lastWeatherUpdate = millis(); lastWeatherUpdate = millis();