Skip to content

Issue in CANID allocation #10

Description

@david284

I believe the code in CBUSbase::checkCANenum has a slight error

at line 1025, there's
selected_id = ((i * 16) + b);

The array is actually of bytes, so the variable i should be multiplied by 8, not 16
selected_id = ((i * 8) + b);

As the array is 16 elements, I see why this happened (I had to look several times before I saw it)

I've shamelessly copied this bit of code, and wondered why the selected CANID was much higher than expected

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions