make transmit_obd_can_frame canFD aware.

This commit is contained in:
mvgalen 2025-03-14 09:02:37 +01:00
parent 643b02ab51
commit f389732e84
3 changed files with 4 additions and 3 deletions

View file

@ -2338,7 +2338,7 @@ void transmit_can_battery() {
transmit_can_frame(&MEB_585, can_config.battery); // Systeminfo transmit_can_frame(&MEB_585, can_config.battery); // Systeminfo
transmit_can_frame(&MEB_1A5555A6, can_config.battery); // Temperature QBit 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);
} }
} }

View file

@ -109,8 +109,9 @@ void handle_obd_frame(CAN_frame& rx_frame) {
#endif #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; static CAN_frame OBD_frame;
OBD_frame.FD = canFD;
OBD_frame.ID = address; OBD_frame.ID = address;
OBD_frame.ext_ID = address > 0x7FF; OBD_frame.ext_ID = address > 0x7FF;
OBD_frame.DLC = 8; OBD_frame.DLC = 8;

View file

@ -6,6 +6,6 @@
void handle_obd_frame(CAN_frame& rx_frame); 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_ #endif // _OBD_H_