From 9e9a4d0943302cefadf4277a35f89ec0d24f9419 Mon Sep 17 00:00:00 2001 From: technyon Date: Sun, 15 May 2022 09:21:43 +0200 Subject: [PATCH] ignore ack and unknown_action for lock action --- Network.cpp | 2 +- networkDevices/WifiDevice.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Network.cpp b/Network.cpp index b5ec1a9..19c59be 100644 --- a/Network.cpp +++ b/Network.cpp @@ -218,7 +218,7 @@ void Network::onMqttDataReceived(char *&topic, byte *&payload, unsigned int &len if(comparePrefixedPath(topic, mqtt_topic_lock_action)) { - if(strcmp(value, "") == 0) return; + if(strcmp(value, "") == 0 || strcmp(value, "ack") == 0 || strcmp(value, "unknown_action") == 0) return; Serial.print(F("Lock action received: ")); Serial.println(value); diff --git a/networkDevices/WifiDevice.cpp b/networkDevices/WifiDevice.cpp index 1f8b042..0dc14ef 100644 --- a/networkDevices/WifiDevice.cpp +++ b/networkDevices/WifiDevice.cpp @@ -63,8 +63,6 @@ bool WifiDevice::isConnected() bool WifiDevice::reconnect() { - vTaskDelay( 1000 / portTICK_PERIOD_MS); - return isConnected(); }