ISO-TP does not work on real car #4427

This commit is contained in:
rusefillc 2022-08-09 13:12:51 -04:00
parent 6e8c0f24d5
commit bf15c5bc8a
2 changed files with 10 additions and 2 deletions

View File

@ -355,12 +355,20 @@ can_msg_t CanStreamerState::streamReceiveTimeout(size_t *np, uint8_t *rxbuf, can
return CAN_MSG_OK;
}
static int isoTpPacketCounter = 0;
/**
* incoming data main entry point
*/
void CanTsListener::decodeFrame(const CANRxFrame& frame, efitick_t /*nowNt*/) {
// CAN ID filtering happens in base class, by the time we are here we know it's the CAN_ECU_SERIAL_RX_ID packet
// todo: what if the FIFO is full?
CanRxMessage msg(frame);
if (engineConfiguration->verboseIsoTp) {
PRINT("*** INFO: CanTsListener decodeFrame %d" PRINT_EOL, isoTpPacketCounter++);
}
if (!rxFifo.put(msg)) {
//warning(CUSTOM_ERR_CAN_COMMUNICATION, "CAN sendDataTimeout() problems");
warning(CUSTOM_ERR_CAN_COMMUNICATION, "CAN sendDataTimeout() problems");
}
}

View File

@ -2136,7 +2136,7 @@ typedef enum {
// 8000-8050 logging errors
CUSTOM_OBD_MMC_ERROR = 8000,
// 8000-8050 logging errors
CUSTOM_ERR_CAN_COMMUNICATION = 8900,
CUSTOM_ERR_TRIGGER_SYNC = 9000,
CUSTOM_OBD_TRIGGER_WAVEFORM = 9001,