Skip to content

Questionable |= in signal packing functions #38

Description

@sebtombs

Thank you for this very useful CAN code generator. However, the signal packing functions use |=

The code to the right of the |= already includes all the signals in the byte (i.e. we are not assembling the byte by several lines ORing into the same byte). I would therefore suggest that = should be used for the signal packing and that the |= is only needed for the checksum.

|= has the appearance of working correctly provided that the cframe->Data elements are zeroed but this is not always necessarily the case.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions