forked from airgradienthq/arduino
turn led indicate wifi failed, cloud fail and get cloud configuration fail to off.
This commit is contained in:
@ -874,13 +874,15 @@ static void configUpdateHandle() {
|
|||||||
|
|
||||||
static void appLedHandler(void) {
|
static void appLedHandler(void) {
|
||||||
AgStateMachineState state = AgStateMachineNormal;
|
AgStateMachineState state = AgStateMachineNormal;
|
||||||
if (wifiConnector.isConnected() == false) {
|
if (configuration.isOfflineMode() == false) {
|
||||||
state = AgStateMachineWiFiLost;
|
if (wifiConnector.isConnected() == false) {
|
||||||
} else if (apiClient.isFetchConfigureFailed()) {
|
state = AgStateMachineWiFiLost;
|
||||||
stateMachine.displaySetAddToDashBoard();
|
} else if (apiClient.isFetchConfigureFailed()) {
|
||||||
state = AgStateMachineSensorConfigFailed;
|
stateMachine.displaySetAddToDashBoard();
|
||||||
} else if (apiClient.isPostToServerFailed()) {
|
state = AgStateMachineSensorConfigFailed;
|
||||||
state = AgStateMachineServerLost;
|
} else if (apiClient.isPostToServerFailed()) {
|
||||||
|
state = AgStateMachineServerLost;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stateMachine.handleLeds(state);
|
stateMachine.handleLeds(state);
|
||||||
|
Reference in New Issue
Block a user