From ad4468739271c4512998a7f0f77d9ce013230725 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Fri, 27 Apr 2018 23:44:29 +0200 Subject: [PATCH] watchdog reset cleanup --- src/blecsan.cpp | 3 +-- src/main.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/blecsan.cpp b/src/blecsan.cpp index 8dd4bb15..34036749 100644 --- a/src/blecsan.cpp +++ b/src/blecsan.cpp @@ -286,8 +286,7 @@ void bt_loop(void * pvParameters) while(1) { - vTaskDelay(10/portTICK_PERIOD_MS); - yield(); + vTaskDelay(10/portTICK_PERIOD_MS); // reset watchdog } end: diff --git a/src/main.cpp b/src/main.cpp index d50a7d1a..bdf6eca3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -167,11 +167,9 @@ void lorawan_loop(void * pvParameters) { LMIC_reset(); // Reset the MAC state. Session and pending data transfers will be discarded. }; vTaskDelay(1000/portTICK_PERIOD_MS); - yield(); } */ - vTaskDelay(10/portTICK_PERIOD_MS); - yield(); + vTaskDelay(10/portTICK_PERIOD_MS); // reset watchdog } } @@ -233,6 +231,8 @@ void sniffer_loop(void * pvParameters) { channel = (channel % WIFI_CHANNEL_MAX) + 1; wifi_sniffer_set_channel(channel); ESP_LOGD(TAG, "Wifi set channel %d", channel); + + vTaskDelay(10/portTICK_PERIOD_MS); // reset watchdog } } // end of infinite wifi channel rotation loop @@ -627,6 +627,8 @@ void loop() { reset_salt(); // get new salt for salting hashes } + vTaskDelay(10/portTICK_PERIOD_MS); // reset watchdog + } /* end Aruino LOOP ------------------------------------------------------------ */