From 08a9b8a55749bf4d0e014c84f63dbf5b33ef3213 Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Thu, 27 Jan 2022 21:40:25 +0100 Subject: [PATCH] Revert "add some task watchdog handling" This reverts commit 13eaae74acdcfa00aef2e660e2fe63df64dfeedb. --- include/globals.h | 3 --- src/gpsread.cpp | 4 +--- src/led.cpp | 2 -- src/lorawan.cpp | 6 ++---- src/main.cpp | 4 ---- 5 files changed, 3 insertions(+), 16 deletions(-) diff --git a/include/globals.h b/include/globals.h index b012dae9..fb2e773e 100644 --- a/include/globals.h +++ b/include/globals.h @@ -8,9 +8,6 @@ #include #include -// task watchdog functions -#include - // std::set for unified array functions #include #include diff --git a/src/gpsread.cpp b/src/gpsread.cpp index ad4d811e..86da8fef 100644 --- a/src/gpsread.cpp +++ b/src/gpsread.cpp @@ -138,12 +138,10 @@ time_t get_gpstime(uint16_t *msec) { void gps_loop(void *pvParameters) { _ASSERT((uint32_t)pvParameters == 1); // FreeRTOS check - esp_task_wdt_add(NULL); while (1) { - esp_task_wdt_reset(); // feed task watchdog + while (cfg.payloadmask & GPS_DATA) { - esp_task_wdt_reset(); // feed task watchdog #ifdef GPS_SERIAL // feed GPS decoder with serial NMEA data from GPS device while (GPS_Serial.available()) diff --git a/src/led.cpp b/src/led.cpp index 083dbcc8..8095a3a9 100644 --- a/src/led.cpp +++ b/src/led.cpp @@ -141,9 +141,7 @@ void blink_LED(uint16_t set_color, uint16_t set_blinkduration) { #if (HAS_LED != NOT_A_PIN) || defined(HAS_RGB_LED) void ledLoop(void *parameter) { - esp_task_wdt_add(NULL); while (1) { - esp_task_wdt_reset(); // feed task watchdog // Custom blink running always have priority other LoRaWAN led // management if (LEDBlinkStarted && LEDBlinkDuration) { diff --git a/src/lorawan.cpp b/src/lorawan.cpp index 178ff7d7..3414bb9e 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -343,11 +343,9 @@ uint32_t lora_queuewaiting(void) { // LMIC loop task void lmictask(void *pvParameters) { _ASSERT((uint32_t)pvParameters == 1); - esp_task_wdt_add(NULL); while (1) { - esp_task_wdt_reset(); // feed task watchdog - os_runloop_once(); // execute lmic scheduled jobs and events - delay(2); // yield to CPU + os_runloop_once(); // execute lmic scheduled jobs and events + delay(2); // yield to CPU } } diff --git a/src/main.cpp b/src/main.cpp index 4d573df7..c3c5af5c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -104,10 +104,6 @@ void setup() { (*((uint32_t volatile *)ETS_UNCACHED_ADDR((DR_REG_RTCCNTL_BASE + 0xd4)))) = 0; #endif - // task watchdog configuration - //esp_task_wdt_init(1, true); - esp_task_wdt_deinit(); - // setup debug output or silence device #if (VERBOSE) Serial.begin(115200);