From 457d46529bd76304ba29a0c20fd7e70c420c5ab9 Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Tue, 22 Dec 2020 19:13:46 +0100 Subject: [PATCH] enter_deepsleep: stop senddata early --- src/reset.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/reset.cpp b/src/reset.cpp index 18412909..3a07d227 100644 --- a/src/reset.cpp +++ b/src/reset.cpp @@ -89,6 +89,9 @@ void enter_deepsleep(const uint64_t wakeup_sec = 60, RTC_runmode = RUNMODE_SLEEP; + // stop further enqueuing of senddata and MAC processing + sendTimer.detach(); + // switch off radio #if (WIFICOUNTER) switch_wifi_sniffer(0); @@ -98,8 +101,7 @@ void enter_deepsleep(const uint64_t wakeup_sec = 60, btStop(); #endif - // stop further enqueuing of senddata and MAC processing - sendTimer.detach(); + // stop MAC processing vTaskDelete(macProcessTask); // halt interrupts accessing i2c bus