mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/CAN-Demo.git
synced 2025-06-10 19:15:59 +00:00
35 lines
661 B
C++
35 lines
661 B
C++
/*
|
|
* printable.cpp
|
|
*
|
|
* Created on: Aug 30, 2023
|
|
* Author: Dario
|
|
*/
|
|
|
|
#include <sta/tacos.hpp>
|
|
#include <tasks/can_spam.hpp>
|
|
#include <tasks/can_receiver.hpp>
|
|
namespace sta
|
|
{
|
|
namespace tacos
|
|
{
|
|
void onStatemachineInit()
|
|
{
|
|
|
|
}
|
|
|
|
void onManagerInit()
|
|
{
|
|
// ###### Register different threads for different states here. ######
|
|
|
|
// Register Spam Thread to only run in the first state
|
|
addThread<demo::CanSpam>({ALL_STATES}, 0x123);
|
|
// Register Receive Thread to run in states 0 and 2
|
|
addThread<demo::CanReceiver>({0,2}, 0x124);
|
|
|
|
|
|
STA_DEBUG_PRINTF("The answer to everything is %d", 42);
|
|
}
|
|
} // namespace tacos
|
|
} // namespace sta
|
|
|