mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-30 00:47:17 +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,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