From 550ec320766ab1adc63131c9c2e33501fa6dfdbd Mon Sep 17 00:00:00 2001 From: dario Date: Sun, 31 Dec 2023 08:21:25 +0100 Subject: [PATCH] Disabled printable initialization if debugging is not enabled --- src/startup.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/startup.cpp b/src/startup.cpp index 1a9e4fb..8ceebf7 100644 --- a/src/startup.cpp +++ b/src/startup.cpp @@ -5,6 +5,7 @@ * Author: Dario */ +#include #include #include @@ -28,11 +29,11 @@ extern osMutexId_t uartMutexHandle; namespace sta { +#ifdef STA_DEBUGGING_ENABLED // Here the printable used for debugging is defined. Printable * Debug; - namespace tacos - { + namespace tacos { void initPrintable() { // Initialize the mutex for UART communication. @@ -45,8 +46,11 @@ namespace sta STA_DEBUG_PRINTLN("UART SUCCESSFULLY INITIALIZED"); } + } +#endif // STA_DEBUGGING_ENABLED - + namespace tacos + { STA_WEAK void onStatemachineInit() {} @@ -79,7 +83,9 @@ namespace sta // Override the weak implementation of startupExtras provided in rtos2-utils. void startupExtras(void * argument) { +#ifdef STA_DEBUGGING_ENABLED tacos::initPrintable(); +#endif // STA_DEBUGGING_ENABLED tacos::initStatemachine();