Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIN diagnostic frames shall always use checksum calculation of protocol version 1. #9

Open
ChrisPHL opened this issue Dec 31, 2020 · 0 comments

Comments

@ChrisPHL
Copy link

ChrisPHL commented Dec 31, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant