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

Use smaller of response size and size in OD #395

Merged

Conversation

ljungholm
Copy link
Contributor

Some devices use simplified logic for sending SDO response. They send an expedited 4 byte response for all sizes up to U32/I32. Unpacking code expects data size to exactly match the size in the object dictionary. Therefore use the smaller of the size for the variable in the OD and the actual response size.

I have seen this behaviour from two different types of devices, so it is not an isolated problem with one device type.

Some devices use simplified logic for sending SDO response.
They send an expedited 4 byte response for all sizes up to U32/I32.
Unpacking code expects data size to exactly match the size in the
object dictionary.
Therefore use the smaller of the size for the variable in the OD and
the actual response size.
@christiansandberg christiansandberg merged commit 6f9f06e into christiansandberg:master Sep 17, 2023
1 check passed
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.

None yet

2 participants