Variable Stack size via config.hpp for manager and statemachine

This commit is contained in:
CarlWachter 2024-03-25 13:14:25 +01:00 committed by carlwachter
parent b6e91026c4
commit a6eabf559f
3 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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_{}
{

View File

@ -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},