Skip to content

Commit 4c7e72b

Browse files
committed
Better logging
Fix notif when wifi not connect
1 parent d4b4f51 commit 4c7e72b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/OneOpenAir/OneOpenAir.ino

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,11 @@ static void configurationUpdateSchedule(void) {
908908
return;
909909
}
910910

911+
if (wifiConnector.isConnected() == false) {
912+
Serial.println(" WiFi not connected, skipping fetch configuration from AG server");
913+
return;
914+
}
915+
911916
if (apiClient.fetchServerConfiguration()) {
912917
configUpdateHandle();
913918
}
@@ -1008,6 +1013,7 @@ static void updateDisplayAndLedBar(void) {
10081013
if (wifiConnector.isConnected() == false) {
10091014
stateMachine.displayHandle(AgStateMachineWiFiLost);
10101015
stateMachine.handleLeds(AgStateMachineWiFiLost);
1016+
return;
10111017
}
10121018

10131019
if (configuration.isCloudConnectionDisabled()) {

0 commit comments

Comments
 (0)