From a2c22ab4e62529fd42ecbc6db6581b18dee1adb9 Mon Sep 17 00:00:00 2001 From: Simon Kassen Date: Sat, 25 Jan 2025 18:28:51 +0100 Subject: [PATCH] added the ability to announce the creation and termination of TacosThreads in init() and cleanup(). Needs to be enabled with #define STA_TACOS_DIAGNOSTICS_ENABLED --- src/thread.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/thread.cpp b/src/thread.cpp index ed5ed12..6e40eb8 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -56,7 +56,11 @@ namespace sta } } - void TacosThread::init() {} + void TacosThread::init() { +#ifdef STA_TACOS_DIAGNOSTICS_ENABLED + STA_DEBUG_PRINTF("Started %s", getName()); +#endif //STA_TACOS_DIAGNOSTICS_ENABLED + } void TacosThread::loop() { @@ -102,7 +106,11 @@ namespace sta osThreadExit(); } - void TacosThread::cleanup() {} + void TacosThread::cleanup() { +#ifdef STA_TACOS_DIAGNOSTICS_ENABLED + STA_DEBUG_PRINTF("Stopped %s", getName()); +#endif + } void TacosThread::sleep(uint32_t ticks) {