From 6b53844dbafe37112417aaad084cee46cfbada79 Mon Sep 17 00:00:00 2001 From: "@CarlWachter" Date: Tue, 12 Sep 2023 13:50:06 +0200 Subject: [PATCH 1/7] Updated Dependencies for event support --- .gitmodules | 1 + Libs/rtos2-utils | 2 +- Libs/sta-core | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 743bb74..278add8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,6 +4,7 @@ [submodule "Libs/sta-core"] path = Libs/sta-core url = ssh://git@git.intern.spaceteamaachen.de:22222/ALPAKA/sta-core.git + branch = adding-events [submodule "Libs/rtos2-utils"] path = Libs/rtos2-utils url = ssh://git@git.intern.spaceteamaachen.de:22222/ALPAKA/rtos2-utils.git diff --git a/Libs/rtos2-utils b/Libs/rtos2-utils index ad6c4fd..7ea8bb8 160000 --- a/Libs/rtos2-utils +++ b/Libs/rtos2-utils @@ -1 +1 @@ -Subproject commit ad6c4fd297865cb697037052d3b354b6d2405fe1 +Subproject commit 7ea8bb839e5a72e48b80ba9d646bbf6db3e50bd5 diff --git a/Libs/sta-core b/Libs/sta-core index 8e93db1..53b583d 160000 --- a/Libs/sta-core +++ b/Libs/sta-core @@ -1 +1 @@ -Subproject commit 8e93db18174937562f246af4b1e8d99bd6bbf632 +Subproject commit 53b583d56e7da75560413a2387bfebff89e6902a From 1e0bf245c6da8bbbcbfcd5134b73d931cf69a561 Mon Sep 17 00:00:00 2001 From: "@CarlWachter" Date: Tue, 12 Sep 2023 14:50:40 +0200 Subject: [PATCH 2/7] Updated Dependencies for timer support --- Libs/rtos2-utils | 2 +- Libs/sta-core | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Libs/rtos2-utils b/Libs/rtos2-utils index 7ea8bb8..5b8c97c 160000 --- a/Libs/rtos2-utils +++ b/Libs/rtos2-utils @@ -1 +1 @@ -Subproject commit 7ea8bb839e5a72e48b80ba9d646bbf6db3e50bd5 +Subproject commit 5b8c97cf5c4b57702c25c0f7e7bcaea4575a6f7d diff --git a/Libs/sta-core b/Libs/sta-core index 53b583d..751435d 160000 --- a/Libs/sta-core +++ b/Libs/sta-core @@ -1 +1 @@ -Subproject commit 53b583d56e7da75560413a2387bfebff89e6902a +Subproject commit 751435d9467ca8d5ae5f63e50e4238724dcf877b From c586135648a0c013493c1921cf9b129359526960 Mon Sep 17 00:00:00 2001 From: dario Date: Thu, 14 Sep 2023 22:05:38 +0200 Subject: [PATCH 3/7] Renamed Function --- App/Src/tasks/manager.cpp | 2 +- Libs/rtos2-utils | 2 +- Libs/sta-core | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/App/Src/tasks/manager.cpp b/App/Src/tasks/manager.cpp index ca2f36a..868f51b 100644 --- a/App/Src/tasks/manager.cpp +++ b/App/Src/tasks/manager.cpp @@ -57,7 +57,7 @@ void dummyInit(void *) osThreadExit(); } -void dummyStated(void *) +void dummyStarted(void *) { while (true) { diff --git a/Libs/rtos2-utils b/Libs/rtos2-utils index 5b8c97c..ad6c4fd 160000 --- a/Libs/rtos2-utils +++ b/Libs/rtos2-utils @@ -1 +1 @@ -Subproject commit 5b8c97cf5c4b57702c25c0f7e7bcaea4575a6f7d +Subproject commit ad6c4fd297865cb697037052d3b354b6d2405fe1 diff --git a/Libs/sta-core b/Libs/sta-core index 751435d..8e93db1 160000 --- a/Libs/sta-core +++ b/Libs/sta-core @@ -1 +1 @@ -Subproject commit 751435d9467ca8d5ae5f63e50e4238724dcf877b +Subproject commit 8e93db18174937562f246af4b1e8d99bd6bbf632 From 344d7f402461d9b128ef267665d6731b84b40c22 Mon Sep 17 00:00:00 2001 From: dario Date: Fri, 22 Sep 2023 15:07:15 +0200 Subject: [PATCH 4/7] Added reworked manager / statemachine tasks, thread implementation and new directory layout --- .cproject | 12 ++- App/Inc/sta/config.hpp | 5 ++ App/Inc/tasks/statemachine.hpp | 13 ++++ App/Src/tasks/manager.cpp | 68 +++++++++++----- App/Src/tasks/statemachine.cpp | 4 +- Tacos/include/sta/tacos/manager.hpp | 86 ++++++++++++++++++++ Tacos/include/sta/tacos/startup.hpp | 31 ++++++++ Tacos/include/sta/tacos/statemachine.hpp | 73 +++++++++++++++++ Tacos/include/sta/tacos/thread.hpp | 78 +++++++++++++++++++ Tacos/src/manager.cpp | 99 ++++++++++++++++++++++++ Tacos/src/startup.cpp | 91 ++++++++++++++++++++++ Tacos/src/statemachine.cpp | 32 ++++++++ Tacos/src/thread.cpp | 86 ++++++++++++++++++++ 13 files changed, 652 insertions(+), 26 deletions(-) create mode 100644 Tacos/include/sta/tacos/manager.hpp create mode 100644 Tacos/include/sta/tacos/startup.hpp create mode 100644 Tacos/include/sta/tacos/statemachine.hpp create mode 100644 Tacos/include/sta/tacos/thread.hpp create mode 100644 Tacos/src/manager.cpp create mode 100644 Tacos/src/startup.cpp create mode 100644 Tacos/src/statemachine.cpp create mode 100644 Tacos/src/thread.cpp diff --git a/.cproject b/.cproject index 97a996a..528a81e 100644 --- a/.cproject +++ b/.cproject @@ -54,6 +54,7 @@ + @@ -77,6 +78,7 @@ + @@ -100,10 +102,11 @@ - - + + + @@ -197,10 +200,10 @@ - - + + @@ -228,4 +231,5 @@ + \ No newline at end of file diff --git a/App/Inc/sta/config.hpp b/App/Inc/sta/config.hpp index 9db0927..f132634 100644 --- a/App/Inc/sta/config.hpp +++ b/App/Inc/sta/config.hpp @@ -27,4 +27,9 @@ #define STA_RTOS_SYSTEM_WATCHDOG_ENABLE #define STA_RTOS_WATCHDOG_ENABLE + +// Settings for TACOS +#define STA_TACOS_MANAGER_PRIORITY osPriorityNormal +#define STA_TACOS_NUM_STATES 4 + #endif /* INC_STA_CONFIG_HPP_ */ diff --git a/App/Inc/tasks/statemachine.hpp b/App/Inc/tasks/statemachine.hpp index e045353..0adc089 100644 --- a/App/Inc/tasks/statemachine.hpp +++ b/App/Inc/tasks/statemachine.hpp @@ -29,4 +29,17 @@ enum tacos_states_t }; +namespace tacos +{ + class StateMachine + { + public: + + + private: + + }; +} + + #endif /* INC_TASKS_STATEMACHINE_HPP_ */ diff --git a/App/Src/tasks/manager.cpp b/App/Src/tasks/manager.cpp index 868f51b..8a286b0 100644 --- a/App/Src/tasks/manager.cpp +++ b/App/Src/tasks/manager.cpp @@ -6,42 +6,70 @@ */ +#include +#include + #include #include #include #include -#include -#include + #include +#include -#define STATE_CHANGED_MSK 0x01 -#define STATE_CHANGED_TIMOUT_MSK 0x02 -// The state changed event defined somewhere else. -extern osEventFlagsId_t stateChangeEvent_id; +namespace tacos +{ + + // The data structure representing a TACOS task. + struct tacos_task_t + { + // The code to be executed for this task. + osThreadFunc_t func; + + // The attributes for the task. + osThreadAttr_t attribs; + + // A list of currently running instances of this task. + std::list running; + + // A list of states for which this task should be running. + std::list states; + }; + + +} // namespace tacos + // The current state defined somewhere else. extern tacos_states_t currentState; -// The data structure representing a TACOS task. -struct tacos_task_t +extern "C" { - // The code to be executed for this task. - osThreadFunc_t func; + void managerTask(void *) + { + STA_DEBUG_PRINTLN("INITIALIZED MANAGER TASK"); + + while (true) + { + // Wait until the state machine triggers an event signaling a state-change. + uint32_t flags = osEventFlagsWait(stateChangeEvent_id, STATE_CHANGED_MSK, osFlagsWaitAll, osWaitForever); + + + } + } +} + + + + - // The attributes for the task. - osThreadAttr_t attribs; - // A list of currently running instances of this task. - std::list running; - // A list of states for which this task should be running. - std::list states; -}; std::list tasks; @@ -111,12 +139,12 @@ extern "C" void startManagerTask(void *) { if (!task.running.empty()) { - osThreadCreate(thread_def, argument); + osThreadDef (task.attribs.name, task.attribs.priority, 1, 0); + + osThreadCreate(osTh, argument); } } } - - STA_DEBUG_PRINTLN("STARTING NEW TASKS DUE TO STATE CHANGE!"); } osThreadExit(); diff --git a/App/Src/tasks/statemachine.cpp b/App/Src/tasks/statemachine.cpp index e3326bb..e06e9c4 100644 --- a/App/Src/tasks/statemachine.cpp +++ b/App/Src/tasks/statemachine.cpp @@ -46,8 +46,8 @@ void changeState(uint8_t flag) osEventFlagsSet(stateChangeEvent_id, flag); osEventFlagsClear(stateChangeEvent_id, TACOS_STATE_CHG_ALL); - uint8_t lockoutCycles = 0; - uint8_t failsafeCycles = 0; + uint32_t lockoutCycles = 0; + uint32_t failsafeCycles = 0; switch (currentState) { case tacos_states_t::init: diff --git a/Tacos/include/sta/tacos/manager.hpp b/Tacos/include/sta/tacos/manager.hpp new file mode 100644 index 0000000..3de94c7 --- /dev/null +++ b/Tacos/include/sta/tacos/manager.hpp @@ -0,0 +1,86 @@ +/* + * manager.hpp + * + * Created on: Sep 19, 2023 + * Author: Dario + */ + +#ifndef INCLUDE_STA_TACOS_MANAGER_HPP_ +#define INCLUDE_STA_TACOS_MANAGER_HPP_ + + +#include + +#ifndef STA_TACOS_MANAGER_PRIORITY +# error "Manger task priority not specified in config.hpp" +#else + +#include +#include +#include + +namespace sta +{ + namespace tacos + { + class Manager : public TacosThread + { + public: + static Manager* instance() + { + static CGuard g; + + if (!_instance) + { + // Create a the manager singleton instance. + Manager::_instance = new Manager(); + + // Start the manager task as a tacos task. + Manager::_instance->start(); + } + + return _instance; + } + + void registerThread(TacosThread thread, std::list states); + + void init() override; + + void func() override; + + private: + class CGuard + { + public: + ~CGuard() + { + if( NULL != Manager::_instance ) + { + delete Manager::_instance; + Manager::_instance = NULL; + } + } + }; + + static Manager* _instance; + + Manager(); + + Manager(const Manager&); + + ~Manager() {} + + void updateThreads(); + + void startThreads(uint16_t state); + + void stopThreads(uint16_t state); + + std::set threads_[STA_TACOS_NUM_STATES]; + }; + } // namespace tacos +} // namespace sta + +#endif // STA_TACOS_MANAGER_PRIORITY + +#endif /* INCLUDE_STA_TACOS_MANAGER_HPP_ */ diff --git a/Tacos/include/sta/tacos/startup.hpp b/Tacos/include/sta/tacos/startup.hpp new file mode 100644 index 0000000..f108f85 --- /dev/null +++ b/Tacos/include/sta/tacos/startup.hpp @@ -0,0 +1,31 @@ +/* + * startup.hpp + * + * Created on: 22 Sep 2023 + * Author: Dario + */ + +#ifndef INCLUDE_STA_TACOS_STARTUP_HPP_ +#define INCLUDE_STA_TACOS_STARTUP_HPP_ + +namespace sta +{ + namespace tacos + { + /** + * @brief Function that is called before the statemachine task is started. + * Override it to adjust the statemachine to your specifications. + */ + void onStatemachineInit(); + + /** + * @brief Function that is called before the manager task is started. + * Override it to adjust the manager to your specifications. + */ + void onManagerInit(); + } // namespace tacos +} // namespace sta + + + +#endif /* INCLUDE_STA_TACOS_STARTUP_HPP_ */ diff --git a/Tacos/include/sta/tacos/statemachine.hpp b/Tacos/include/sta/tacos/statemachine.hpp new file mode 100644 index 0000000..363776b --- /dev/null +++ b/Tacos/include/sta/tacos/statemachine.hpp @@ -0,0 +1,73 @@ +/* + * statemachine.hpp + * + * Created on: Sep 14, 2023 + * Author: Dario + */ + +#ifndef INCLUDE_TACOS_STATEMACHINE_HPP_ +#define INCLUDE_TACOS_STATEMACHINE_HPP_ + +#include + +#include + +namespace sta +{ + namespace tacos + { + class Statemachine : public TacosThread + { + public: + static Statemachine* instance() + { + static CGuard g; + + if (!_instance) + { + // Create a the manager singleton instance. + Statemachine::_instance = new Statemachine(); + + // Start the manager task as a tacos task. + Statemachine::_instance->start(); + } + + return _instance; + } + + void init() override; + + void func() override; + + uint16_t getCurrentState(); + + private: + class CGuard + { + public: + ~CGuard() + { + if( NULL != Statemachine::_instance ) + { + delete Statemachine::_instance; + Statemachine::_instance = NULL; + } + } + }; + + Statemachine(); + + Statemachine(const Statemachine&); + + ~Statemachine() {} + + static Statemachine * _instance; + + uint16_t currentState_; + }; + } // namespace tacos +} // namespace sta + + + +#endif /* INCLUDE_TACOS_STATEMACHINE_HPP_ */ diff --git a/Tacos/include/sta/tacos/thread.hpp b/Tacos/include/sta/tacos/thread.hpp new file mode 100644 index 0000000..94d1a1a --- /dev/null +++ b/Tacos/include/sta/tacos/thread.hpp @@ -0,0 +1,78 @@ +/* + * task.hpp + * + * Created on: Sep 14, 2023 + * Author: Dario + */ + +#ifndef INCLUDE_TACOS_TASK_HPP_ +#define INCLUDE_TACOS_TASK_HPP_ + +#include + +#include + + +namespace sta +{ + namespace tacos + { + class TacosThread : public RtosThread + { + public: + /** + * + */ + TacosThread(const char* name, osPriority_t prio); + + virtual ~TacosThread(); + + /** + * @brief Start the execution of this thread. + */ + void start(); + + /** + * @brief Checks if this thread is currently running. + */ + bool isRunning(); + + /** + * @brief Get the currently running instance. + */ + osThreadId_t getInstance(); + + /** + * + */ + const char* getName() const; + + bool operator==(const TacosThread& other) const; + bool operator<(const TacosThread& other) const; + + /** + * @brief A function that wraps this task's functionality in a loop. This loop will run until + * termination is requested. + */ + void loop(); + + virtual void init(); + + /** + * @brief The body of the thread's loop. Has to be implemented by the user. + */ + virtual void func(); + private: + /** + * @brief Static function to pass to RTOS to run as a thread. Calls the loop function implemented here. + */ + static void entry_point(void* arg); + + osThreadId_t instance_; + osThreadAttr_t attribs_; + }; + } +} + + +#endif /* INCLUDE_TACOS_TASK_HPP_ */ diff --git a/Tacos/src/manager.cpp b/Tacos/src/manager.cpp new file mode 100644 index 0000000..f95054f --- /dev/null +++ b/Tacos/src/manager.cpp @@ -0,0 +1,99 @@ +/* + * manager.cpp + * + * Created on: Sep 19, 2023 + * Author: Dario + */ + +#include +#include + + +namespace sta +{ + namespace tacos + { + void Manager::registerThread(TacosThread thread, std::list states) + { + for (uint16_t state : states) + { + STA_ASSERT(state < STA_TACOS_NUM_STATES); + + threads_[state].emplace(thread); + } + } + + void Manager::startThreads(uint16_t state) + { + STA_ASSERT(state < STA_TACOS_NUM_STATES); + + for (TacosThread thread : threads_[state]) + { + if (!thread.isRunning()) + { + thread.start(); + } + } + } + + void Manager::stopThreads(uint16_t state) + { + uint16_t currentState = Statemachine::instance()->getCurrentState(); + + for (uint16_t state = 0; state < STA_TACOS_NUM_STATES; ++state) + { + if (state == currentState) + { + continue; + } + + for (TacosThread thread : threads_[state]) + { + // If the thread is currently running but not part of the set of threads that should be running... + if (thread.isRunning() && threads_[currentState].count(thread) == 0) + { + // ...politely request termination. + thread.requestTermination(); + } + } + } + } + + void Manager::updateThreads() + { + uint16_t state = Statemachine::instance()->getCurrentState(); + + startThreads(state); + stopThreads(state); + } + + void Manager::init() + { + startThreads(Statemachine::instance()->getCurrentState()); + } + + void Manager::func() + { + // Wait for either the termination request or the state change flag. + uint32_t flags = osEventFlagsWait(getInstance(), STA_RTOS_THREAD_FLAG_TERMINATE, osFlagsWaitAny, osWaitForever); + + if ((flags & STA_RTOS_THREAD_FLAG_TERMINATE) != 0) + { + // The loop implemented by the TacosThread class should handle termination. + return; + } + + // Start all new tasks and stop all the tasks that aren't supposed to be running. + updateThreads(); + } + + Manager::Manager() + : TacosThread{"Manager", STA_TACOS_MANAGER_PRIORITY} + { + + } + + } // namespace tacos +} // namespace sta + + diff --git a/Tacos/src/startup.cpp b/Tacos/src/startup.cpp new file mode 100644 index 0000000..51e7670 --- /dev/null +++ b/Tacos/src/startup.cpp @@ -0,0 +1,91 @@ +/* + * startup.cpp + * + * Created on: 22 Sep 2023 + * Author: Dario + */ + + +#include +#include +#include + +// sta-core-specific imports. +#include +#include +#include +#include + +// Tacos-specific includes. +#include +#include +#include + + +// The UART mutex defined in freertos.c +extern osMutexId_t uartMutexHandle; + + +namespace sta +{ + // Here the printable used for debugging is defined. + Printable * Debug; + + namespace tacos + { + void initPrintable() + { + // Initialize the mutex for UART communication. + RtosMutex * mutex = new RtosMutex(&uartMutexHandle); + + // Initialize the UART interface and printable object. + UARTSettings settings = { .mode = UARTMode::RX_TX }; + STM32UART * intf_ptr = new STM32UART(&huart2, settings, mutex); + Debug = new PrintableUART(intf_ptr); + + STA_DEBUG_PRINTLN("UART SUCCESSFULLY INITIALIZED"); + } + + + STA_WEAK + void onStatemachineInit() + {} + + + void initStatemachine() + { + onStatemachineInit(); + + Statemachine::instance()->start(); + } + + + STA_WEAK + void onManagerInit() + {} + + + void initManager() + { + onManagerInit(); + + Statemachine::instance()->start(); + } + } // namespace tacos + + + namespace rtos + { + // Override the weak implementation of startupExtras provided in rtos2-utils. + void startupExtras(void * argument) + { + tacos::initPrintable(); + + tacos::initStatemachine(); + + tacos::initManager(); + } + } // namespace rtos +} // namespace sta + + diff --git a/Tacos/src/statemachine.cpp b/Tacos/src/statemachine.cpp new file mode 100644 index 0000000..9388863 --- /dev/null +++ b/Tacos/src/statemachine.cpp @@ -0,0 +1,32 @@ +/* + * statemachine.cpp + * + * Created on: 21 Sep 2023 + * Author: Dario + */ + +#include + +namespace sta +{ + namespace tacos + { + void Statemachine::init() + { + + } + + void Statemachine::func() + { + + } + + uint16_t Statemachine::getCurrentState() + { + return currentState_; + } + } // namespace tacos +} // namespace sta + + + diff --git a/Tacos/src/thread.cpp b/Tacos/src/thread.cpp new file mode 100644 index 0000000..4a8e94b --- /dev/null +++ b/Tacos/src/thread.cpp @@ -0,0 +1,86 @@ +/* + * thread.cpp + * + * Created on: Sep 14, 2023 + * Author: Dario + */ + + +#include +#include + +#include +#include + + +namespace sta +{ + namespace tacos + { + TacosThread::TacosThread(const char* name, osPriority_t prio) + : RtosThread(RtosHandle(Handle::Deferred(&instance_))), + attribs_{ .name = name, .priority = prio } + { + + } + + static void entry_point(void* arg) + { + STA_ASSERT(arg != nullptr); + + TacosThread* instance = reinterpret_cast(arg) ; + instance->loop(); + } + + void TacosThread::start() + { + STA_ASSERT(!isRunning()); + + instance_ = osThreadNew(entry_point, this, &attribs_); + + STA_ASSERT(instance_ != NULL); + } + + bool TacosThread::isRunning() + { + return instance_ != NULL; + } + + osThreadId_t TacosThread::getInstance() + { + STA_ASSERT(isRunning()); + + return instance_; + } + + const char* TacosThread::getName() const + { + return attribs_.name; + } + + void TacosThread::loop() + { + init(); + + while ((osEventFlagsGet(instance_) & STA_RTOS_THREAD_FLAG_TERMINATE) == 0) + { + func(); + } + + instance_ = NULL; + + osThreadExit(); + } + + bool TacosThread::operator==(const TacosThread& other) const + { + return std::strcmp(this->getName(), other.getName()) == 0; + } + + bool TacosThread::operator<(const TacosThread& other) const + { + return std::strcmp(this->getName(), other.getName()) < 0; + } + } // namespace tacos +} // namespace sta + From 7981931155bb3d9193dcf7b19aa53702c3a23e9e Mon Sep 17 00:00:00 2001 From: dario Date: Fri, 22 Sep 2023 15:50:26 +0200 Subject: [PATCH 5/7] Added dummy task. Still a lot of compiler errors to be fixed --- .cproject | 14 +-- .settings/stm32cubeide.project.prefs | 2 +- App/Inc/tasks/dummy.hpp | 25 ++++ App/Inc/tasks/statemachine.hpp | 45 ------- App/Src/startup.cpp | 39 +++--- App/Src/tasks/dummy.cpp | 34 +++++ App/Src/tasks/manager.cpp | 152 ----------------------- App/Src/tasks/output.cpp | 25 ---- App/Src/tasks/statemachine.cpp | 107 ---------------- App/Src/{tasks => }/watchdog.cpp | 8 +- Core/Src/freertos.c | 18 --- TACOS-Demo.ioc | 2 +- Tacos/include/sta/tacos/statemachine.hpp | 4 +- 13 files changed, 88 insertions(+), 387 deletions(-) create mode 100644 App/Inc/tasks/dummy.hpp delete mode 100644 App/Inc/tasks/statemachine.hpp create mode 100644 App/Src/tasks/dummy.cpp delete mode 100644 App/Src/tasks/manager.cpp delete mode 100644 App/Src/tasks/output.cpp delete mode 100644 App/Src/tasks/statemachine.cpp rename App/Src/{tasks => }/watchdog.cpp (53%) diff --git a/.cproject b/.cproject index 528a81e..178b7ac 100644 --- a/.cproject +++ b/.cproject @@ -101,12 +101,12 @@ - - - - - + + + + + @@ -200,10 +200,10 @@ - - + + diff --git a/.settings/stm32cubeide.project.prefs b/.settings/stm32cubeide.project.prefs index 96364d8..0ad0f8c 100644 --- a/.settings/stm32cubeide.project.prefs +++ b/.settings/stm32cubeide.project.prefs @@ -1,5 +1,5 @@ 635E684B79701B039C64EA45C3F84D30=C96BA6CC9F20E1205A6EBDFF40205165 66BE74F758C12D739921AEA421D593D3=4 8DF89ED150041C4CBC7CB9A9CAA90856=D6E44E0C9E8538D2672E3627575EB9A7 -DC22A860405A8BF2F2C095E5B6529F12=B7A8998BB86F8064A3F4829332693759 +DC22A860405A8BF2F2C095E5B6529F12=D6E44E0C9E8538D2672E3627575EB9A7 eclipse.preferences.version=1 diff --git a/App/Inc/tasks/dummy.hpp b/App/Inc/tasks/dummy.hpp new file mode 100644 index 0000000..aea9df6 --- /dev/null +++ b/App/Inc/tasks/dummy.hpp @@ -0,0 +1,25 @@ +/* + * dummy.hpp + * + * Created on: 22 Sep 2023 + * Author: Dario + */ + +#ifndef INC_TASKS_DUMMY_HPP_ +#define INC_TASKS_DUMMY_HPP_ + +#include + +namespace demo +{ + class DummyTask : public sta::tacos::TacosThread { + public: + DummyTask(const char* name); + + void init() override; + + void func() override; + }; +} // namespace demo + +#endif /* INC_TASKS_DUMMY_HPP_ */ diff --git a/App/Inc/tasks/statemachine.hpp b/App/Inc/tasks/statemachine.hpp deleted file mode 100644 index 0adc089..0000000 --- a/App/Inc/tasks/statemachine.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * statemachine.hpp - * - * Created on: Sep 6, 2023 - * Author: Dario - */ - -#ifndef INC_TASKS_STATEMACHINE_HPP_ -#define INC_TASKS_STATEMACHINE_HPP_ - -// Two flags for the state change event. TODO: HOW TO SET THE VALUES? -#define TACOS_STATE_CHG_FORCED 0x01 -#define TACOS_STATE_CHG_TIMEOUT 0x02 -#define TACOS_STATE_CHG_NATURAL 0x03 -#define TACOS_STATE_CHG_ALL TACOS_STATE_CHG_FORCED | TACOS_STATE_CHG_TIMEOUT | TACOS_STATE_CHG_NATURAL - - -// The event for signaling state changes to other tasks -osEventFlagsId_t stateChangeEvent_id; - - -// The states used for this demo -enum tacos_states_t -{ - init, - started, - flying, - landed -}; - - -namespace tacos -{ - class StateMachine - { - public: - - - private: - - }; -} - - -#endif /* INC_TASKS_STATEMACHINE_HPP_ */ diff --git a/App/Src/startup.cpp b/App/Src/startup.cpp index 18cc29e..1cd7e5b 100644 --- a/App/Src/startup.cpp +++ b/App/Src/startup.cpp @@ -5,38 +5,31 @@ * Author: Dario */ -#include -#include -#include -#include -#include +#include #include -// The UART mutex defined in freertos.c -extern osMutexId_t uartMutexHandle; +#include +#include namespace sta { - // Here the printable used for debugging is defined. - Printable * Debug; - - namespace rtos + namespace tacos { - // Override the weak implementation of startupExtras provided in rtos2-utils. - void startupExtras(void * argument) + void onStatemachineInit() { - // Initialize the mutex for UART communication. - RtosMutex * mutex = new RtosMutex(&uartMutexHandle); - - // Initialize the UART interface and printable object. - UARTSettings settings = { .mode = UARTMode::RX_TX }; - STM32UART * intf_ptr = new STM32UART(&huart2, settings, mutex); - Debug = new PrintableUART(intf_ptr); - - STA_DEBUG_PRINTLN("UART SUCCESSFULLY INITIALIZED"); + STA_DEBUG_PRINTLN("Starting statemachine task!"); } - } // namespace rtos + + void onManagerInit() + { + STA_DEBUG_PRINTLN("Starting manager task!"); + + Manager::instance()->registerThread(demo::DummyTask("A"), {0, 1}); + Manager::instance()->registerThread(demo::DummyTask("B"), {1, 2}); + Manager::instance()->registerThread(demo::DummyTask("C"), {2, 3}); + } + } // namespace tacos } // namespace sta diff --git a/App/Src/tasks/dummy.cpp b/App/Src/tasks/dummy.cpp new file mode 100644 index 0000000..90bb5f2 --- /dev/null +++ b/App/Src/tasks/dummy.cpp @@ -0,0 +1,34 @@ +/* + * dummy.cpp + * + * Created on: 22 Sep 2023 + * Author: Dario + */ + +#include +#include + +#include + + +namespace demo +{ + DummyTask::DummyTask(const char* name) + : TacosThread(name, osPriorityNormal) + { + + } + + void DummyTask::init() + { + STA_DEBUG_PRINTLN("Initialized dummy task!"); + } + + void DummyTask::func() + { + STA_DEBUG_PRINT("Executing "); + STA_DEBUG_PRINTLN(this->getName()); + } +} // namespace demo + + diff --git a/App/Src/tasks/manager.cpp b/App/Src/tasks/manager.cpp deleted file mode 100644 index 8a286b0..0000000 --- a/App/Src/tasks/manager.cpp +++ /dev/null @@ -1,152 +0,0 @@ -/* - * manager.cpp - * - * Created on: Aug 30, 2023 - * Author: Dario - */ - - -#include -#include - -#include -#include - -#include -#include - - -#include - -#include - - -namespace tacos -{ - - // The data structure representing a TACOS task. - struct tacos_task_t - { - // The code to be executed for this task. - osThreadFunc_t func; - - // The attributes for the task. - osThreadAttr_t attribs; - - // A list of currently running instances of this task. - std::list running; - - // A list of states for which this task should be running. - std::list states; - }; - - -} // namespace tacos - - -// The current state defined somewhere else. -extern tacos_states_t currentState; - - -extern "C" -{ - void managerTask(void *) - { - STA_DEBUG_PRINTLN("INITIALIZED MANAGER TASK"); - - while (true) - { - // Wait until the state machine triggers an event signaling a state-change. - uint32_t flags = osEventFlagsWait(stateChangeEvent_id, STATE_CHANGED_MSK, osFlagsWaitAll, osWaitForever); - - - } - } -} - - - - - - - - -std::list tasks; - - - -void dummyInit(void *) -{ - while (true) - { - STA_DEBUG_PRINTLN("INIT STATE"); - } - - osThreadExit(); -} - -void dummyStarted(void *) -{ - while (true) - { - STA_DEBUG_PRINTLN("STARTED STATE"); - } - - osThreadExit(); -} - -void dummyFlying(void *) -{ - while (true) - { - STA_DEBUG_PRINTLN("FLYING STATE"); - } - - osThreadExit(); -} - -void dummyLanded(void *) -{ - while (true) - { - STA_DEBUG_PRINTLN("LANDED STATE"); - } - - osThreadExit(); -} - - -extern "C" void startManagerTask(void *) -{ - STA_DEBUG_PRINTLN("INITIALIZED MANAGER TASK"); - - while (true) - { - // Wait until the state machine triggers an event signaling a state-change. - osEventFlagsWait(stateChangeEvent_id, STATE_CHANGED_MSK, osFlagsWaitAll, osWaitForever); - - for (tacos_task_t task : tasks) - { - // Check if this task is supposed to be running for this state. If not, kill all instances, else create the desired number of instances. - if (std::find(task.states.begin(), task.states.end(), currentState) == task.states.end()) - { - for (osThreadId_t instance : task.running) - { - osThreadTerminate(instance); - } - } - else - { - if (!task.running.empty()) - { - osThreadDef (task.attribs.name, task.attribs.priority, 1, 0); - - osThreadCreate(osTh, argument); - } - } - } - } - - osThreadExit(); -} - diff --git a/App/Src/tasks/output.cpp b/App/Src/tasks/output.cpp deleted file mode 100644 index 8c9854b..0000000 --- a/App/Src/tasks/output.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * manager.cpp - * - * Created on: Aug 31, 2023 - * Author: Carl - */ - -#include -#include -#include - -#include - - -extern "C" void outputTask(void *) -{ - while (true) - { - STA_DEBUG_PRINTLN("OUTPUT TASK RUNNING"); - - osThreadYield(); - } - - osThreadExit(); -} diff --git a/App/Src/tasks/statemachine.cpp b/App/Src/tasks/statemachine.cpp deleted file mode 100644 index e06e9c4..0000000 --- a/App/Src/tasks/statemachine.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* - * state_machine.cpp - * - * Created on: Sep 4, 2023 - * Author: Dario - */ - -#include - -#include -#include - - -tacos_states_t currentState; - -osTimerId_t lockout; -osTimerId_t failsafe; - - -void lockoutCallback(void* arg) -{ - -} - -void failsafeCallback(void* arg) -{ - changeState(TACOS_STATE_CHG_TIMEOUT); -} - - - -bool checkStateChangeConditions() -{ - // Only use the timers in this demo. - return false; -} - - -void changeState(uint8_t flag) -{ - // Stop the old timers. - osTimerStop(lockout); - osTimerStop(failsafe); - - // Set the event flags to signal other tasks that a state change has occured. Reset the flags immediately. - osEventFlagsSet(stateChangeEvent_id, flag); - osEventFlagsClear(stateChangeEvent_id, TACOS_STATE_CHG_ALL); - - uint32_t lockoutCycles = 0; - uint32_t failsafeCycles = 0; - - switch (currentState) { - case tacos_states_t::init: - currentState = tacos_states_t::started; - - lockoutCycles = 5000; - failsafeCycles = 6000; - - case tacos_states_t::started: - currentState = tacos_states_t::flying; - - lockoutCycles = 1000; - failsafeCycles = 2000; - - case tacos_states_t::flying: - currentState = tacos_states_t::landed; - - lockoutCycles = 5000; - failsafeCycles = 6000; - - break; - default: - break; - } - - // Restart the timers. - osTimerStart(lockout, lockoutCycles); - osTimerStart(failsafe, failsafeCycles); -} - - -extern "C" void startStateMachine(void*) -{ - // Initialize the stateChange event. - stateChangeEvent_id = osEventFlagsNew(NULL); - STA_ASSERT_MSG(stateChangeEvent_id != NULL, "Failed to initialize state change event!"); - - // The timers for catching errors. - lockout = osTimerNew(lockoutCallback, osTimerOnce, NULL, NULL); - failsafe = osTimerNew(failsafeCallback, osTimerOnce, NULL, NULL); - - // Check if the initialization of the timers was successful. - STA_ASSERT_MSG(lockout != 0, "Failed to initialize lockout timer"); - STA_ASSERT_MSG(failsafe != 0, "Failed to initialize failsafe timer"); - - while (true) - { - if (checkStateChangeConditions()) - { - changeState(TACOS_STATE_CHG_NATURAL); - } - } - - osThreadExit(); -} - - diff --git a/App/Src/tasks/watchdog.cpp b/App/Src/watchdog.cpp similarity index 53% rename from App/Src/tasks/watchdog.cpp rename to App/Src/watchdog.cpp index e785bce..a8b8eb1 100644 --- a/App/Src/tasks/watchdog.cpp +++ b/App/Src/watchdog.cpp @@ -12,13 +12,9 @@ namespace sta { namespace rtos { - // Implementation of the watchdog event handler. - void watchdogEventHandler(void *, uint32_t flags) + void watchdogEventHandler(void * arg, uint32_t flags) { - if (flags & STA_WATCHDOG_FLAG_HEARTBEAT) - { - STA_DEBUG_PRINTLN("PING!"); - } + STA_DEBUG_PRINTLN("Watchdog is doing stuff?"); } } } // namespace sta diff --git a/Core/Src/freertos.c b/Core/Src/freertos.c index 8f3a4e1..2cc7d3e 100644 --- a/Core/Src/freertos.c +++ b/Core/Src/freertos.c @@ -29,7 +29,6 @@ /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ -typedef StaticTask_t osStaticThreadDef_t; typedef StaticSemaphore_t osStaticMutexDef_t; /* USER CODE BEGIN PTD */ @@ -56,19 +55,6 @@ const osThreadAttr_t defaultTask_attributes = { .stack_size = 128 * 4, .priority = (osPriority_t) osPriorityNormal, }; - -/* Definitions for managerTask */ -osThreadId_t managerTaskHandle; -uint32_t managerTaskBuffer[ 128 ]; -osStaticThreadDef_t managerTaskControlBlock; -const osThreadAttr_t managerTask_attributes = { - .name = "managerTask", - .cb_mem = &managerTaskControlBlock, - .cb_size = sizeof(managerTaskControlBlock), - .stack_mem = &managerTaskBuffer[0], - .stack_size = sizeof(managerTaskBuffer), - .priority = (osPriority_t) osPriorityLow, -}; /* Definitions for uartMutex */ osMutexId_t uartMutexHandle; osStaticMutexDef_t uartMutex_cb; @@ -84,7 +70,6 @@ const osMutexAttr_t uartMutex_attributes = { /* USER CODE END FunctionPrototypes */ void StartDefaultTask(void *argument); -extern void startManagerTask(void *argument); void MX_FREERTOS_Init(void); /* (MISRA C 2004 rule 8.1) */ @@ -133,9 +118,6 @@ void MX_FREERTOS_Init(void) { /* creation of defaultTask */ defaultTaskHandle = osThreadNew(StartDefaultTask, NULL, &defaultTask_attributes); - /* creation of managerTask */ - managerTaskHandle = osThreadNew(startManagerTask, NULL, &managerTask_attributes); - /* USER CODE BEGIN RTOS_THREADS */ /* add threads, ... */ /* USER CODE END RTOS_THREADS */ diff --git a/TACOS-Demo.ioc b/TACOS-Demo.ioc index 2b3194c..d7c0de1 100644 --- a/TACOS-Demo.ioc +++ b/TACOS-Demo.ioc @@ -5,7 +5,7 @@ CAD.provider= FREERTOS.FootprintOK=true FREERTOS.IPParameters=Tasks01,configUSE_NEWLIB_REENTRANT,configRECORD_STACK_HIGH_ADDRESS,configCHECK_FOR_STACK_OVERFLOW,Mutexes01,FootprintOK FREERTOS.Mutexes01=uartMutex,Static,uartMutex_cb -FREERTOS.Tasks01=defaultTask,24,128,StartDefaultTask,Default,NULL,Dynamic,NULL,NULL;managerTask,8,128,startManagerTask,As external,NULL,Static,managerTaskBuffer,managerTaskControlBlock +FREERTOS.Tasks01=defaultTask,24,128,StartDefaultTask,Default,NULL,Dynamic,NULL,NULL FREERTOS.configCHECK_FOR_STACK_OVERFLOW=1 FREERTOS.configRECORD_STACK_HIGH_ADDRESS=1 FREERTOS.configUSE_NEWLIB_REENTRANT=1 diff --git a/Tacos/include/sta/tacos/statemachine.hpp b/Tacos/include/sta/tacos/statemachine.hpp index 363776b..0a90231 100644 --- a/Tacos/include/sta/tacos/statemachine.hpp +++ b/Tacos/include/sta/tacos/statemachine.hpp @@ -42,6 +42,8 @@ namespace sta uint16_t getCurrentState(); private: + static Statemachine * _instance; + class CGuard { public: @@ -61,8 +63,6 @@ namespace sta ~Statemachine() {} - static Statemachine * _instance; - uint16_t currentState_; }; } // namespace tacos From 118a829420ab55a9fcec7a925a8d2e04f4f40dc3 Mon Sep 17 00:00:00 2001 From: CarlWachter Date: Fri, 22 Sep 2023 19:56:19 +0200 Subject: [PATCH 6/7] Fixed compiler errors --- .cproject | 14 ++++++------- .settings/language.settings.xml | 4 ++-- .settings/stm32cubeide.project.prefs | 4 ++-- App/Inc/tasks/dummy.hpp | 1 + App/Src/tasks/dummy.cpp | 2 ++ Libs/rtos2-utils | 2 +- Libs/sta-core | 2 +- Tacos/include/sta/tacos/manager.hpp | 31 ++++++++++++++-------------- Tacos/include/sta/tacos/thread.hpp | 4 ++++ Tacos/src/manager.cpp | 4 ++++ Tacos/src/statemachine.cpp | 5 +++++ Tacos/src/thread.cpp | 14 ++++++++++--- 12 files changed, 55 insertions(+), 32 deletions(-) diff --git a/.cproject b/.cproject index 178b7ac..ad382b7 100644 --- a/.cproject +++ b/.cproject @@ -216,20 +216,20 @@ + - - - - - - + + + + + + - \ No newline at end of file diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml index 4089cb2..c21b7c1 100644 --- a/.settings/language.settings.xml +++ b/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/.settings/stm32cubeide.project.prefs b/.settings/stm32cubeide.project.prefs index 0ad0f8c..7d34349 100644 --- a/.settings/stm32cubeide.project.prefs +++ b/.settings/stm32cubeide.project.prefs @@ -1,5 +1,5 @@ 635E684B79701B039C64EA45C3F84D30=C96BA6CC9F20E1205A6EBDFF40205165 66BE74F758C12D739921AEA421D593D3=4 -8DF89ED150041C4CBC7CB9A9CAA90856=D6E44E0C9E8538D2672E3627575EB9A7 -DC22A860405A8BF2F2C095E5B6529F12=D6E44E0C9E8538D2672E3627575EB9A7 +8DF89ED150041C4CBC7CB9A9CAA90856=C37D8D153607683CBCB65A289104E87E +DC22A860405A8BF2F2C095E5B6529F12=D2A4E69D593A17CDA189062ADCC0CBF3 eclipse.preferences.version=1 diff --git a/App/Inc/tasks/dummy.hpp b/App/Inc/tasks/dummy.hpp index aea9df6..0c7de2b 100644 --- a/App/Inc/tasks/dummy.hpp +++ b/App/Inc/tasks/dummy.hpp @@ -15,6 +15,7 @@ namespace demo class DummyTask : public sta::tacos::TacosThread { public: DummyTask(const char* name); + ~DummyTask() override; void init() override; diff --git a/App/Src/tasks/dummy.cpp b/App/Src/tasks/dummy.cpp index 90bb5f2..c93f329 100644 --- a/App/Src/tasks/dummy.cpp +++ b/App/Src/tasks/dummy.cpp @@ -19,6 +19,8 @@ namespace demo } + DummyTask::~DummyTask(){} + void DummyTask::init() { STA_DEBUG_PRINTLN("Initialized dummy task!"); diff --git a/Libs/rtos2-utils b/Libs/rtos2-utils index ad6c4fd..f813e7b 160000 --- a/Libs/rtos2-utils +++ b/Libs/rtos2-utils @@ -1 +1 @@ -Subproject commit ad6c4fd297865cb697037052d3b354b6d2405fe1 +Subproject commit f813e7b6eacdde978bf77ed9a1bce7fb38ab4c1d diff --git a/Libs/sta-core b/Libs/sta-core index 8e93db1..1498bcc 160000 --- a/Libs/sta-core +++ b/Libs/sta-core @@ -1 +1 @@ -Subproject commit 8e93db18174937562f246af4b1e8d99bd6bbf632 +Subproject commit 1498bcc449bd1c0756aaa1b1e33251288091f9ab diff --git a/Tacos/include/sta/tacos/manager.hpp b/Tacos/include/sta/tacos/manager.hpp index 3de94c7..e59ffba 100644 --- a/Tacos/include/sta/tacos/manager.hpp +++ b/Tacos/include/sta/tacos/manager.hpp @@ -48,27 +48,13 @@ namespace sta void func() override; - private: - class CGuard - { - public: - ~CGuard() - { - if( NULL != Manager::_instance ) - { - delete Manager::_instance; - Manager::_instance = NULL; - } - } - }; - static Manager* _instance; - + private: Manager(); Manager(const Manager&); - ~Manager() {} + //~Manager(); void updateThreads(); @@ -77,6 +63,19 @@ namespace sta void stopThreads(uint16_t state); std::set threads_[STA_TACOS_NUM_STATES]; + + class CGuard + { + public: + ~CGuard() + { + if( NULL != Manager::_instance ) + { + delete Manager::_instance; + Manager::_instance = NULL; + } + } + }; }; } // namespace tacos } // namespace sta diff --git a/Tacos/include/sta/tacos/thread.hpp b/Tacos/include/sta/tacos/thread.hpp index 94d1a1a..0b9bf4f 100644 --- a/Tacos/include/sta/tacos/thread.hpp +++ b/Tacos/include/sta/tacos/thread.hpp @@ -25,6 +25,8 @@ namespace sta */ TacosThread(const char* name, osPriority_t prio); + TacosThread(); + virtual ~TacosThread(); /** @@ -62,7 +64,9 @@ namespace sta * @brief The body of the thread's loop. Has to be implemented by the user. */ virtual void func(); + private: + /** * @brief Static function to pass to RTOS to run as a thread. Calls the loop function implemented here. */ diff --git a/Tacos/src/manager.cpp b/Tacos/src/manager.cpp index f95054f..e44ae79 100644 --- a/Tacos/src/manager.cpp +++ b/Tacos/src/manager.cpp @@ -93,6 +93,10 @@ namespace sta } + //Manager::~Manager(){} + + Manager* Manager::_instance = nullptr; + } // namespace tacos } // namespace sta diff --git a/Tacos/src/statemachine.cpp b/Tacos/src/statemachine.cpp index 9388863..3cc017e 100644 --- a/Tacos/src/statemachine.cpp +++ b/Tacos/src/statemachine.cpp @@ -11,6 +11,8 @@ namespace sta { namespace tacos { + Statemachine::Statemachine(){} + void Statemachine::init() { @@ -25,6 +27,9 @@ namespace sta { return currentState_; } + + Statemachine* Statemachine::_instance = nullptr; + } // namespace tacos } // namespace sta diff --git a/Tacos/src/thread.cpp b/Tacos/src/thread.cpp index 4a8e94b..09ab927 100644 --- a/Tacos/src/thread.cpp +++ b/Tacos/src/thread.cpp @@ -20,11 +20,13 @@ namespace sta TacosThread::TacosThread(const char* name, osPriority_t prio) : RtosThread(RtosHandle(Handle::Deferred(&instance_))), attribs_{ .name = name, .priority = prio } - { + {} - } + TacosThread::TacosThread() + : RtosThread(RtosHandle(Handle::Deferred(&instance_))) + {} - static void entry_point(void* arg) + void TacosThread::entry_point(void* arg) { STA_ASSERT(arg != nullptr); @@ -81,6 +83,12 @@ namespace sta { return std::strcmp(this->getName(), other.getName()) < 0; } + + void TacosThread::init(){} + void TacosThread::func(){} + + TacosThread::~TacosThread(){} + } // namespace tacos } // namespace sta From 2b51c6cb0aba9bc4601ffb2568259be7f6314412 Mon Sep 17 00:00:00 2001 From: dario Date: Sat, 23 Sep 2023 10:16:41 +0200 Subject: [PATCH 7/7] Added minor changes --- .cproject | 12 ++++++------ .settings/language.settings.xml | 4 ++-- .settings/stm32cubeide.project.prefs | 4 ++-- Libs/rtos2-utils | 2 +- Libs/sta-core | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.cproject b/.cproject index ad382b7..4e0c038 100644 --- a/.cproject +++ b/.cproject @@ -219,17 +219,17 @@ + + + + + + - - - - - - \ No newline at end of file diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml index c21b7c1..4089cb2 100644 --- a/.settings/language.settings.xml +++ b/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/.settings/stm32cubeide.project.prefs b/.settings/stm32cubeide.project.prefs index 7d34349..96364d8 100644 --- a/.settings/stm32cubeide.project.prefs +++ b/.settings/stm32cubeide.project.prefs @@ -1,5 +1,5 @@ 635E684B79701B039C64EA45C3F84D30=C96BA6CC9F20E1205A6EBDFF40205165 66BE74F758C12D739921AEA421D593D3=4 -8DF89ED150041C4CBC7CB9A9CAA90856=C37D8D153607683CBCB65A289104E87E -DC22A860405A8BF2F2C095E5B6529F12=D2A4E69D593A17CDA189062ADCC0CBF3 +8DF89ED150041C4CBC7CB9A9CAA90856=D6E44E0C9E8538D2672E3627575EB9A7 +DC22A860405A8BF2F2C095E5B6529F12=B7A8998BB86F8064A3F4829332693759 eclipse.preferences.version=1 diff --git a/Libs/rtos2-utils b/Libs/rtos2-utils index f813e7b..ad6c4fd 160000 --- a/Libs/rtos2-utils +++ b/Libs/rtos2-utils @@ -1 +1 @@ -Subproject commit f813e7b6eacdde978bf77ed9a1bce7fb38ab4c1d +Subproject commit ad6c4fd297865cb697037052d3b354b6d2405fe1 diff --git a/Libs/sta-core b/Libs/sta-core index 1498bcc..8e93db1 160000 --- a/Libs/sta-core +++ b/Libs/sta-core @@ -1 +1 @@ -Subproject commit 1498bcc449bd1c0756aaa1b1e33251288091f9ab +Subproject commit 8e93db18174937562f246af4b1e8d99bd6bbf632