From 953a5d0f637736936d2e58a66637a23e547b8ba7 Mon Sep 17 00:00:00 2001 From: Michael Geramb Date: Sat, 18 Nov 2023 21:15:23 +0100 Subject: [PATCH] Add function to get min free stack of autopoll task --- src/HomeSpan.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/HomeSpan.h b/src/HomeSpan.h index a9477ac..4e2876f 100644 --- a/src/HomeSpan.h +++ b/src/HomeSpan.h @@ -359,6 +359,10 @@ class Span{ Span& setRebootCallback(void (*f)(uint8_t),uint32_t t=DEFAULT_REBOOT_CALLBACK_TIME){rebootCallback=f;rebootCallbackTime=t;return(*this);} + uint32_t getAutoPollMinFreeStack(){ + return uxTaskGetStackHighWaterMark(pollTaskHandle); + } + void autoPoll(uint32_t stackSize=8192, uint32_t priority=1, uint32_t cpu=0){ // start pollTask() xTaskCreateUniversal([](void *parms){ for(;;){