Added new task for testing

This commit is contained in:
dario
2023-11-21 19:47:41 +01:00
committed by carlwachter
parent 5217945c03
commit a70dc00f4c
9 changed files with 84 additions and 8 deletions

35
App/Src/tasks/disturb.cpp Normal file
View File

@@ -0,0 +1,35 @@
/*
* disturb.cpp
*
* Created on: Nov 20, 2023
* Author: Dario
*/
#include <tasks/disturb.hpp>
#include <sta/tacos/statemachine.hpp>
#include <sta/debug/debug.hpp>
namespace demo
{
DisturbTask::DisturbTask()
: sta::tacos::TacosThread("Disturb", osPriorityNormal)
{
}
void DisturbTask::init()
{
}
void DisturbTask::func()
{
STA_DEBUG_PRINTLN(this->getName());
sta::tacos::Statemachine::instance()->stateChangeEvent.wait(sta::tacos::EventFlags::ALL, osWaitForever);
uint16_t currentState = sta::tacos::Statemachine::instance()->getCurrentState();
sta::tacos::Statemachine::instance()->requestTimedStateTransition(currentState, 2, 4000, 0);
}
} // namespace demo