Skip to content

Protection Type support for 4 bit checksums  #7

@nickumlauf

Description

@nickumlauf

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions