From 8086b2d8e5cfb160cb5aeb7ee81f48d03135c511 Mon Sep 17 00:00:00 2001 From: dario Date: Thu, 28 Sep 2023 12:32:47 +0200 Subject: [PATCH] Minor changes --- App/Inc/sta/config.hpp | 1 + Libs/rtos2-utils | 2 +- Libs/sta-core | 2 +- Tacos/src/statemachine.cpp | 5 +++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/App/Inc/sta/config.hpp b/App/Inc/sta/config.hpp index f132634..c1cacbf 100644 --- a/App/Inc/sta/config.hpp +++ b/App/Inc/sta/config.hpp @@ -31,5 +31,6 @@ // Settings for TACOS #define STA_TACOS_MANAGER_PRIORITY osPriorityNormal #define STA_TACOS_NUM_STATES 4 +#define STA_TACOS_INITIAL_STATE 0 #endif /* INC_STA_CONFIG_HPP_ */ diff --git a/Libs/rtos2-utils b/Libs/rtos2-utils index 2948c92..6d444e7 160000 --- a/Libs/rtos2-utils +++ b/Libs/rtos2-utils @@ -1 +1 @@ -Subproject commit 2948c9203e44a5126e6a0067522698964f0ee7c4 +Subproject commit 6d444e7cfc2c8e9597270a42db46afe1066093d0 diff --git a/Libs/sta-core b/Libs/sta-core index 4dc625f..1498bcc 160000 --- a/Libs/sta-core +++ b/Libs/sta-core @@ -1 +1 @@ -Subproject commit 4dc625f6e9ebe8db0fc795719a26ee900425b49a +Subproject commit 1498bcc449bd1c0756aaa1b1e33251288091f9ab diff --git a/Tacos/src/statemachine.cpp b/Tacos/src/statemachine.cpp index 7c2ab30..0972024 100644 --- a/Tacos/src/statemachine.cpp +++ b/Tacos/src/statemachine.cpp @@ -29,15 +29,16 @@ namespace sta lockoutTimer_.setCallback([](void *) { STA_DEBUG_PRINTLN("[LOCKOUT TIMEOUT]"); }, nullptr); lockoutTimer_.start(5000); - failsafeTimer_.setCallback([](void *) { STA_DEBUG_PRINTLN("[FAILSAFE TIMEOUT]"); }, nullptr); + failsafeTimer_.setCallback([](void * arg) { STA_DEBUG_PRINTLN("[FAILSAFE TIMEOUT]"); }, nullptr); failsafeTimer_.start(10000); } void Statemachine::func() { STA_DEBUG_PRINTLN("LOOPY LOOP IN STATEMACHINE."); + STA_DEBUG_PRINTLN(lockoutTimer_.isRunning() ? "LOCKOUT RUNNING!" : "LOCKOUT STOPPED!"); - osDelay(3000); + osDelay(500); } uint16_t Statemachine::getCurrentState() const