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

Fixing LIBMODBUS_VERSION_HEX encoding #345

Closed
wants to merge 1 commit into from

Conversation

GiovanniFrigo
Copy link

The given definition for LIBMODBUS_VERSION_HEX is not coherent with the result given by the macro itself, which is left-shifted by an extra factor of 8 bits.

For example, current implementation for version 1.2.3 would be encoded like 0x01020300 instead of 0x010203.

You can either accept this pull request (breaking change here if someone did rely on this macro!!) or update the commented definition.

The given definition for LIBMODBUS_VERSION_HEX is not coherent with the result given by the macro itself, which is left-shifted by an extra factor of 8 bits.

For example, current implementation for version 1.2.3 would be encoded like 0x01020300 instead of 0x010203.

You can either accept this pull request (breaking change here if someone did rely on this macro!!) or update the commented definition.
@stephane stephane added this to the v3.2.0 milestone Jul 18, 2016
@stephane stephane self-assigned this Jul 18, 2016
@stephane stephane added the valid label Jul 18, 2016
@stephane stephane closed this in 75543b2 Sep 8, 2016
@stephane
Copy link
Owner

stephane commented Sep 9, 2016

Thank you Giovanni.

georgidimov pushed a commit to georgidimov/libmodbus that referenced this pull request Jul 24, 2017
The result of LIBMODBUS_VERSION_HEX is left-shifted by an extra
factor of 8 bits.

For example, current implementation for version 1.2.3 would be
encoded like 0x01020300 instead of 0x010203.
epsilonrt pushed a commit to epsilonrt/libmodbus that referenced this pull request Jun 19, 2023
The result of LIBMODBUS_VERSION_HEX is left-shifted by an extra
factor of 8 bits.

For example, current implementation for version 1.2.3 would be
encoded like 0x01020300 instead of 0x010203.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants