Introduce Transmitter interface for generic comm transmit and Shunt

class
This commit is contained in:
Jaakko Haakana 2025-06-02 23:44:18 +03:00
parent dbe3de7422
commit 94cc5effa4
16 changed files with 181 additions and 134 deletions

View file

@ -0,0 +1,16 @@
#include "../include.h"
#include "Shunt.h"
CanShunt* shunt = nullptr;
void setup_can_shunt() {
#if defined(CAN_SHUNT_SELECTED) && defined(SELECTED_SHUNT_CLASS)
shunt = new SELECTED_SHUNT_CLASS();
#endif
}
void handle_incoming_can_frame_shunt(CAN_frame rx_frame) {
if (shunt) {
shunt->handle_incoming_can_frame(rx_frame);
}
}