mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
make transmit_obd_can_frame canFD aware.
This commit is contained in:
parent
643b02ab51
commit
f389732e84
3 changed files with 4 additions and 3 deletions
|
@ -2338,7 +2338,7 @@ void transmit_can_battery() {
|
|||
transmit_can_frame(&MEB_585, can_config.battery); // Systeminfo
|
||||
transmit_can_frame(&MEB_1A5555A6, can_config.battery); // Temperature QBit
|
||||
|
||||
transmit_obd_can_frame(0x18DA05F1, can_config.battery);
|
||||
transmit_obd_can_frame(0x18DA05F1, can_config.battery, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -109,8 +109,9 @@ void handle_obd_frame(CAN_frame& rx_frame) {
|
|||
#endif
|
||||
}
|
||||
|
||||
void transmit_obd_can_frame(unsigned int address, int interface) {
|
||||
void transmit_obd_can_frame(unsigned int address, int interface, bool canFD) {
|
||||
static CAN_frame OBD_frame;
|
||||
OBD_frame.FD = canFD;
|
||||
OBD_frame.ID = address;
|
||||
OBD_frame.ext_ID = address > 0x7FF;
|
||||
OBD_frame.DLC = 8;
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
|
||||
void handle_obd_frame(CAN_frame& rx_frame);
|
||||
|
||||
void transmit_obd_can_frame(unsigned int address, int interface);
|
||||
void transmit_obd_can_frame(unsigned int address, int interface, bool canFD);
|
||||
|
||||
#endif // _OBD_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue