mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/TACOS.git
synced 2025-06-12 01:25:59 +00:00
51 lines
1.2 KiB
C++
51 lines
1.2 KiB
C++
/*
|
|
* printable.cpp
|
|
*
|
|
* Created on: Aug 30, 2023
|
|
* Author: Dario
|
|
*/
|
|
|
|
|
|
#include <sta/tacos/startup.hpp>
|
|
#include <sta/debug/debug.hpp>
|
|
|
|
#include <sta/tacos/manager.hpp>
|
|
#include <sta/tacos/statemachine.hpp>
|
|
#include <tasks/dummy.hpp>
|
|
#include <tasks/toggle.hpp>
|
|
#include <tasks/disturb.hpp>
|
|
#include <gpio.h>
|
|
#include <sta/devices/stm32/gpio_pin.hpp>
|
|
#include <sta/rtos/debug/heap_stats.hpp>
|
|
|
|
#include <memory>
|
|
|
|
|
|
namespace sta
|
|
{
|
|
namespace tacos
|
|
{
|
|
void onStatemachineInit()
|
|
{
|
|
|
|
}
|
|
|
|
void onManagerInit()
|
|
{
|
|
// ###### Register different threads for different states here. ######
|
|
|
|
// The dummy task runs for state 0.
|
|
Manager::instance()->registerThread(std::make_shared<demo::DummyTask>("State 0"), {0});
|
|
Manager::instance()->registerThread(std::make_shared<demo::DummyTask>("State 1"), {1});
|
|
Manager::instance()->registerThread(std::make_shared<demo::DummyTask>("State 2 - FAIL"), {2});
|
|
Manager::instance()->registerThread(std::make_shared<demo::Toggle>(), {0, 1});
|
|
// Manager::instance()->registerThread(std::make_shared<demo::DisturbTask>(), {0, 1});
|
|
|
|
STA_DEBUG_PRINTF("The answer to everything is %d", 42);
|
|
|
|
STA_DEBUG_HEAP_STATS();
|
|
}
|
|
} // namespace tacos
|
|
} // namespace sta
|
|
|