From d7cc575196f91f76491d09b3897694a526a63049 Mon Sep 17 00:00:00 2001 From: keeramis Date: Mon, 5 Oct 2020 20:32:49 -0500 Subject: [PATCH] Network error to change led signaling --- system/src/system_task.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/src/system_task.cpp b/system/src/system_task.cpp index ceb3b82c33..978373047e 100644 --- a/system/src/system_task.cpp +++ b/system/src/system_task.cpp @@ -325,6 +325,10 @@ void establish_cloud_connection() // the last error diagnostic is used only for communication errors since we cannot mix // HAL and communication error codes without specifying the category of an error WARN("Cloud socket connection failed: %d", connect_result); + if (connect_result == SYSTEM_ERROR_NETWORK) { + LED_SIGNAL_STOP(CLOUD_HANDSHAKE); + LED_SIGNAL_STOP(CLOUD_CONNECTING); + } SPARK_CLOUD_SOCKETED = 0; diag->status(CloudDiagnostics::DISCONNECTED);