You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 24, 2023. It is now read-only.
Hello.
I faced a problem trying to read big value with method bool receiveNumber(uint32_t *number).
The method can't construct 32-bit value, because it shifting too small registers here: *number = (temp[4] << 24) | (temp[3] << 16) | (temp[2] << 8) | (temp[1]);
it works better if doing this: *number = ((uint32_t)temp[4] << 24) | ((uint32_t)temp[3] << 16) | ((uint32_t)temp[2] << 8) | (temp[1]);
The text was updated successfully, but these errors were encountered:
Glad you find a solution, unfortunately as the readme states I no longer use (or have access to) these displays so do not support this library anymore.
If you have working modifications to the library I'd happily accept a PR through.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello.
I faced a problem trying to read big value with method bool receiveNumber(uint32_t *number).
The method can't construct 32-bit value, because it shifting too small registers here:
*number = (temp[4] << 24) | (temp[3] << 16) | (temp[2] << 8) | (temp[1]);
it works better if doing this:
*number = ((uint32_t)temp[4] << 24) | ((uint32_t)temp[3] << 16) | ((uint32_t)temp[2] << 8) | (temp[1]);
The text was updated successfully, but these errors were encountered: