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

drop unnecessary calculations #28

Closed
wants to merge 1 commit into from

Conversation

firexx
Copy link

@firexx firexx commented Jan 3, 2019

the bit shift of signed values automatically extend sign
the mask and sign extension was buggy in Adafruit_MAX31855::readCelsius, because
v = 0xFFFFC000 | ((v >> 18) & 0x00003FFFF);
has to be
v = 0xFFFFC000 | ((v >> 18) & 0x00003FFF);
the value is only 14 bits and not 18!

the bit move of signed values automatically extend sign
the mask and sign extension was buggy in Adafruit_MAX31855::readCelsius, because
v = 0xFFFFC000 | ((v >> 18) & 0x00003FFFF);
has to be
v = 0xFFFFC000 | ((v >> 18) & 0x00003FFF);
the value is only 14 bits and not 18!
@caternuson caternuson mentioned this pull request Jan 15, 2020
@caternuson
Copy link
Contributor

Indeed it is. Sorry for lagging in looking at this PR. This was taken care of with #36.
https://github.com/adafruit/Adafruit-MAX31855-library/releases/tag/1.1.1

@caternuson caternuson closed this Jan 15, 2020
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