mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 09:49:32 +02:00
Add event for using missing interface
This commit is contained in:
parent
4f508dba86
commit
d8b91eb34e
5 changed files with 20 additions and 14 deletions
|
@ -897,7 +897,9 @@ void transmit_can(CAN_frame_t* tx_frame, int interface) {
|
|||
MCP2515Frame.data[i] = tx_frame->data.u8[i];
|
||||
}
|
||||
can.tryToSend(MCP2515Frame);
|
||||
#endif
|
||||
#else // Interface not compiled, and settings try to use it
|
||||
set_event(EVENT_INTERFACE_MISSING, interface);
|
||||
#endif //DUAL_CAN
|
||||
} break;
|
||||
case CAN_ADDON_FD_MCP2518:
|
||||
#ifdef CAN_FD
|
||||
|
@ -909,7 +911,9 @@ void transmit_can(CAN_frame_t* tx_frame, int interface) {
|
|||
MCP2518Frame.data[i] = tx_frame->data.u8[i];
|
||||
}
|
||||
canfd.tryToSend(MCP2518Frame);
|
||||
#endif
|
||||
#else // Interface not compiled, and settings try to use it
|
||||
set_event(EVENT_INTERFACE_MISSING, interface);
|
||||
#endif //CAN_FD
|
||||
break;
|
||||
default:
|
||||
// Invalid interface sent with function call. TODO: Raise event that coders messed up
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue