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

Not working on small int boards #3

Open
caternuson opened this issue Oct 1, 2020 · 3 comments
Open

Not working on small int boards #3

caternuson opened this issue Oct 1, 2020 · 3 comments
Assignees

Comments

@caternuson
Copy link
Contributor

Trinket M0 for example:

Adafruit CircuitPython 5.3.1 on 2020-07-13; Adafruit Trinket M0 with samd21e18
>>> import board
>>> from adafruit_ms8607 import MS8607
>>> sensor = MS8607(board.I2C())
>>> sensor.pressure
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adafruit_ms8607.py", line 313, in pressure
  File "adafruit_ms8607.py", line 190, in pressure_and_temperature
  File "adafruit_ms8607.py", line 199, in _scale_temp_pressure
OverflowError: small int overflow
>>> 
@siddacious
Copy link
Contributor

This was mentioned in a forum thread an be I said I'd take a look at modifying the conversion math to allow it to be done with small ints.

The original post seemed to show humidity working if called first, but a following call totemperature failing with the above error

@siddacious siddacious self-assigned this Oct 4, 2020
@siddacious
Copy link
Contributor

The MS8607 has separate sensors in one package for humidity and temp+pressure. It looks like the humidity sensor works without issue but the calibration-related code for the T+P sensor is having issues. I took a look over the weekend and it does look like there is room to use smaller numbers

image

@hongxiangjs
Copy link

this is still an issue, the m0 is still unable to process temperature and pressure with a small int overflow, will a solution to the math be released at some point?

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

No branches or pull requests

3 participants