mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-30 17:07:16 +02:00
Merge pull request #129 from airgradienthq/hotfix/turn-led-off-on-offlinemode
Turn LED indicate wifi failed, cloud failed and get cloud configuration failed to off
This commit is contained in:
@ -874,6 +874,7 @@ static void configUpdateHandle() {
|
|||||||
|
|
||||||
static void appLedHandler(void) {
|
static void appLedHandler(void) {
|
||||||
AgStateMachineState state = AgStateMachineNormal;
|
AgStateMachineState state = AgStateMachineNormal;
|
||||||
|
if (configuration.isOfflineMode() == false) {
|
||||||
if (wifiConnector.isConnected() == false) {
|
if (wifiConnector.isConnected() == false) {
|
||||||
state = AgStateMachineWiFiLost;
|
state = AgStateMachineWiFiLost;
|
||||||
} else if (apiClient.isFetchConfigureFailed()) {
|
} else if (apiClient.isFetchConfigureFailed()) {
|
||||||
@ -882,6 +883,7 @@ static void appLedHandler(void) {
|
|||||||
} else if (apiClient.isPostToServerFailed()) {
|
} else if (apiClient.isPostToServerFailed()) {
|
||||||
state = AgStateMachineServerLost;
|
state = AgStateMachineServerLost;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stateMachine.handleLeds(state);
|
stateMachine.handleLeds(state);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user