Skip to content

Update adafruit_mcp9808.py #5

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

Merged
merged 1 commit into from
Dec 7, 2017
Merged

Update adafruit_mcp9808.py #5

merged 1 commit into from
Dec 7, 2017

Conversation

ryespy
Copy link
Contributor

@ryespy ryespy commented Dec 7, 2017

This change corrects an error in the temperature function that causes it not to return negative values for the temperature when below 0 degrees Celsius. I noticed the issue, but @Jerryn and @cater figured out how to fix it.

This change corrects an error in the temperature function that causes it not to return negative values for the temperature when below 0 degrees Celsius.
@tannewt tannewt self-requested a review December 7, 2017 21:26
@jerryneedell
Copy link
Contributor

This change makes the code behave like the Adafruit Python Library https://github.com/adafruit/Adafruit_Python_MCP9808/blob/master/Adafruit_MCP9808/MCP9808.py and the C++ (Arduino) version https://github.com/adafruit/Adafruit_MCP9808_Library/blob/master/Adafruit_MCP9808.cpp
the original code appeared to implement the code suggested in the MCP9808 Data sheet, but it really does not work as written and I think the data sheet example is incorrect.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for finding the bug and the fix! Stay warm!

@tannewt tannewt merged commit dddf6b8 into adafruit:master Dec 7, 2017
tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 21, 2017
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