From b0f1adfbc4279c544cb2c83a4d28c767acb58028 Mon Sep 17 00:00:00 2001 From: Michael Geramb Date: Wed, 27 Dec 2023 18:02:27 +0100 Subject: [PATCH] Add function to read out the stack usage in the autopoll function --- src/HomeSpan.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/HomeSpan.h b/src/HomeSpan.h index 557a73a..d0816ca 100644 --- a/src/HomeSpan.h +++ b/src/HomeSpan.h @@ -400,6 +400,10 @@ class Span{ LOG0("\n*** AutoPolling Task started with priority=%d\n\n",uxTaskPriorityGet(pollTaskHandle)); } + uint32_t getAutoPollMinFreeStack(){ + return pollTaskHandle != NULL ? uxTaskGetStackHighWaterMark(pollTaskHandle) : 0; + } + Span& setTimeServerTimeout(uint32_t tSec){webLog.waitTime=tSec*1000;return(*this);} // sets wait time (in seconds) for optional web log time server to connect [[deprecated("Please use reserveSocketConnections(n) method instead.")]]