Working manager & statemachine tasks; timers still bugged; statemachine init bugged

This commit is contained in:
dario
2023-09-27 00:07:23 +02:00
parent 5bf6cca3b1
commit 817db58a0e
10 changed files with 83 additions and 31 deletions

View File

@@ -7,6 +7,7 @@
#include <sta/tacos/manager.hpp>
#include <sta/tacos/statemachine.hpp>
#include <sta/debug/debug.hpp>
namespace sta
@@ -69,11 +70,20 @@ namespace sta
void Manager::init()
{
STA_DEBUG_PRINTLN("INITIALIZING MANAGER!");
startThreads(Statemachine::instance()->getCurrentState());
}
void Manager::func()
{
if (true)
{
// STA_DEBUG_PRINTLN("LOOPY LOOP IN MANAGER TASK");
osDelay(1000);
}
// Wait for either the termination request or the state change flag.
uint32_t flags = osEventFlagsWait(getInstance(), STA_RTOS_THREAD_FLAG_TERMINATE, osFlagsWaitAny, osWaitForever);