diff --git a/include/sta/tacos/configs/default.hpp b/include/sta/tacos/configs/default.hpp index eabde5c..42b0b18 100644 --- a/include/sta/tacos/configs/default.hpp +++ b/include/sta/tacos/configs/default.hpp @@ -7,6 +7,10 @@ #define STA_TACOS_WATCHDOG_PRIORITY osPriorityHigh #define STA_TACOS_CAN_BUS_PRIORITY osPriorityHigh +// Set the Stack size for the TACOS threads, to 0 to use the default stack size, set in the ioc +#define STA_TACOS_MANAGER_STACK_SIZE 0 +#define STA_TACOS_STATEMACHINE_STACK_SIZE 0 + // Per default, we assume state 0 to be the initial state. #define STA_TACOS_INITIAL_STATE 0 diff --git a/src/manager.cpp b/src/manager.cpp index 2a1ac39..1d59de1 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -96,7 +96,7 @@ namespace sta } Manager::Manager() - : TacosThread{"Manager", STA_TACOS_MANAGER_PRIORITY}, + : TacosThread{"Manager", STA_TACOS_MANAGER_PRIORITY, STA_TACOS_MANAGER_STACK_SIZE}, threads_{} { diff --git a/src/statemachine.cpp b/src/statemachine.cpp index a5c4609..ea07e01 100644 --- a/src/statemachine.cpp +++ b/src/statemachine.cpp @@ -15,7 +15,7 @@ namespace sta namespace tacos { Statemachine::Statemachine() - : TacosThread{"Statemachine", STA_TACOS_STATEMACHINE_PRIORITY}, + : TacosThread{"Statemachine", STA_TACOS_STATEMACHINE_PRIORITY, STA_TACOS_STATEMACHINE_STACK_SIZE}, currentState_{STA_TACOS_INITIAL_STATE}, lockoutTimer_{[](void *){}, nullptr}, failsafeTimer_{[](void *){}, nullptr},