mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/TACOS.git
synced 2025-06-12 01:25:59 +00:00
36 lines
700 B
C++
36 lines
700 B
C++
/*
|
|
* 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
|
|
|