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

Protection Type support for 4 bit checksums #7

Open
nickumlauf opened this issue Aug 6, 2019 · 0 comments
Open

Protection Type support for 4 bit checksums #7

nickumlauf opened this issue Aug 6, 2019 · 0 comments

Comments

@nickumlauf
Copy link

my check sum is 4 bits and it looks like this custom device checksum is calculated for u8.
the formula we use is
Chksum = (Byte1 + (Byte2 & 0x0F) + Byte3 + Byte4 + Byte5 + Byte6 + Byte7 + Bytes8 + msgID byte1 + msgID byte2 + msgID byte3 + msgID byte4)
= (((chksum >> 6) & 0x03) + (chksum >>3) + chksum) & 0x07
= ((chksum & 0x0F) << 4) + (chksum & 0x0F)

would it be possible to add an option to make for 4 bit checksum:
chksum = "Arb ID + Bytes Checksum with Inversion"
= (((chksum >> 6) & 0x03) + (chksum >>3) + chksum) & 0x07

please build for Veristand 2017

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