mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/TACOS.git
synced 2025-12-17 22:48:03 +00:00
Added new task for testing
This commit is contained in:
35
App/Src/tasks/disturb.cpp
Normal file
35
App/Src/tasks/disturb.cpp
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user