LIN
LIN copied to clipboard
LIN diagnostic frames shall always use checksum calculation of protocol version 1.
in lin.cpp, line 124 should be exchanged to accomplish this automatically:
// LIN diagnostic frame shall always use CHKSUM of protocol version 1.
uint8_t cksum = dataChecksum(message, nBytes, (proto == 1 || addr == 0x3C) ? 0 : addrbyte);
Line 182 accordingly ;-):
// LIN diagnostic frame shall always use CHKSUM of protocol version 1.
if (proto == 1 || addr == 0x3D) idByte = 0; // Don't cksum the ID byte in LIN 1.x