diff --git a/App/Src/startup.cpp b/App/Src/startup.cpp index 4fe3a2b..3078ce3 100644 --- a/App/Src/startup.cpp +++ b/App/Src/startup.cpp @@ -39,7 +39,7 @@ namespace sta Manager::instance()->registerThread(std::make_shared("State 1"), {1}); Manager::instance()->registerThread(std::make_shared("State 2 - FAIL"), {2}); Manager::instance()->registerThread(std::make_shared(), {0, 1}); - Manager::instance()->registerThread(std::make_shared(), {0, 1}); + // Manager::instance()->registerThread(std::make_shared(), {0, 1}); STA_DEBUG_PRINTF("The answer to everything is %d", 42); diff --git a/App/Src/tasks/toggle.cpp b/App/Src/tasks/toggle.cpp index cdeb197..418c34c 100644 --- a/App/Src/tasks/toggle.cpp +++ b/App/Src/tasks/toggle.cpp @@ -24,24 +24,10 @@ namespace demo void Toggle::func() { - osDelay(5000); - - // Have we been requested to terminate while waiting? - if (isTerminationRequested()) - return; - - // Do some important stuff... - uint16_t state = sta::tacos::Statemachine::instance()->getCurrentState(); - uint16_t next; + uint16_t next = 1 - state; - if (state != 2) - { - next = 1 - state; - - STA_DEBUG_PRINTLN("Toggle!"); - sta::tacos::Statemachine::instance()->requestStateTransition(state, next, 0); - } + sta::tacos::Statemachine::instance()->requestStateTransition(state, next, 5000); } } diff --git a/Libs/rtos2-utils b/Libs/rtos2-utils index dccdaca..b1d6456 160000 --- a/Libs/rtos2-utils +++ b/Libs/rtos2-utils @@ -1 +1 @@ -Subproject commit dccdacae426f699405da195f7d6ddb283a12e632 +Subproject commit b1d6456dd88f881f68674824339483f69dd280f0 diff --git a/Libs/sta-core b/Libs/sta-core index fb17c11..c469228 160000 --- a/Libs/sta-core +++ b/Libs/sta-core @@ -1 +1 @@ -Subproject commit fb17c11903d1e7c92a2de3ea08bbed8386a7f35a +Subproject commit c4692287cf88e518d22078c1d284be343fc82fba