chore: Cleanup for Demo

This commit is contained in:
CarlWachter
2024-07-05 14:06:49 +02:00
parent fd7c123a5e
commit 1f6c939630
44 changed files with 432 additions and 7326 deletions

View File

@@ -0,0 +1,41 @@
/*
* can_task.cpp
*
* Created on: 10 Dec 2023
* Author: Carl
*/
#include <sta/tacos.hpp>
#include <tasks/can_spam.hpp>
namespace demo
{
CanSpam::CanSpam(uint32_t canID)
: TacosThread("CAN Spam", osPriorityNormal)
{
setCanID(canID);
}
void CanSpam::init()
{
}
void CanSpam::func()
{
CanSysMsg msg;
// Send some random stuff
msg.payload[0] = 1;
msg.payload[1] = 2;
msg.payload[2] = 3;
msg.header.sid = getCanID();
msg.header.format = 0;
sta::tacos::queueCanBusMsg(msg, 0);
STA_DEBUG_PRINTLN("Can Task sent message");
this->periodicDelay(1); // Delay to ensure 1 Hz rate.
}
} // namespace demo