Skip to content

Conversation

@samsamfire
Copy link
Contributor

Currently, if writing a value with the wrong size inside object dictionary, no errors are raised.
This can cause all sorts of problem : for example when sending PDO frames, the frame could be greater than 8 bytes, etc.
I added a a length check when the expected datatype is of NUMBER_TYPE.

Copy link
Member

@christiansandberg christiansandberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks reasonable.

@acolomb
Copy link
Member

acolomb commented Dec 10, 2022

I guess the automated checks need some attention, though nothing related to the changes in this PR.

@christiansandberg christiansandberg merged commit 45c7caf into canopen-python:master Dec 11, 2022
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

Successfully merging this pull request may close these issues.

3 participants