mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 02:39:57 +02:00
Introduce Transmitter interface for generic comm transmit and Shunt
class
This commit is contained in:
parent
dbe3de7422
commit
94cc5effa4
16 changed files with 181 additions and 134 deletions
16
Software/src/battery/Shunts.cpp
Normal file
16
Software/src/battery/Shunts.cpp
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue