cmake-demo/App/Src/startup.cpp
2025-03-26 13:56:44 +01:00

43 lines
889 B
C++

/*
* printable.cpp
*
* Created on: Aug 30, 2023
* Author: Dario
*/
#include <sta/debug/debug.hpp>
#include <shared.hpp>
#include <tasks/sense.hpp>
#include <tasks/arming.hpp>
#include <tasks/fire.hpp>
#include <sta/rtos/debug/heap_stats.hpp>
#include <sta/devices/stm32/bus/spi.hpp>
#include <states.hpp>
#include <sta/tacos.hpp>
#include <memory>
#include <spi.h>
#include <adc.h>
namespace sta
{
namespace tacos
{
void startup()
{
rres::init();
sta::tacos::addThread<tasks::SenseTask>(ALL_STATES, &hadc1);
sta::tacos::addThread<tasks::ArmingTask>({stahr::ARMED});
sta::tacos::addThread<tasks::FireTask>({stahr::DROGUE, stahr::MAIN, stahr::DISREEFING});
tacos::forceState(tacos::getState(), stahr::READY_ON_PAD);
STA_DEBUG_PRINTF("The answer to everything is %d", 42);
// STA_DEBUG_HEAP_STATS();
}
} // namespace tacos
} // namespace sta