Skip to content

_read_channel_raw fix, longint support #3

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 12, 2024

Conversation

FoamyGuy
Copy link
Contributor

@FoamyGuy FoamyGuy commented Dec 9, 2024

@ladyada
Resolves: #2

Discussed this change on discord with @jepler: https://discord.com/channels/327254708534116352/327298996332658690/1315814085803249724

It seems the code using the longint wasn't correct for the given MIN and MAX values from the datasheet. The corrected code doesn't make use of longint.

I tested importing this modified library on a device without longint to confirm it no longer raises the overflow error.

Sensor is otw and I will test initializing and reading data once it arrives.

@FoamyGuy
Copy link
Contributor Author

I tested the updated library and found that the values it outputs are now comparable to the ones output by the Arduino library, and that it does initialize and read values successfully now on a build without longint.

@FoamyGuy FoamyGuy merged commit ad56d79 into adafruit:main Dec 12, 2024
1 check passed
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 13, 2024
Updating https://github.com/adafruit/Adafruit_CircuitPython_BMP280 to 3.3.5 from 3.3.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_BMP280#45 from jposada202020/adding_displayio_example

Updating https://github.com/adafruit/Adafruit_CircuitPython_HX711 to 1.0.3 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_HX711#3 from FoamyGuy/longint_support

Updating https://github.com/adafruit/Adafruit_CircuitPython_PCF8523 to 2.0.3 from 2.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_PCF8523#34 from jposada202020/adding_displayio_example

Updating https://github.com/adafruit/Adafruit_CircuitPython_turtle to 3.1.3 from 3.1.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_turtle#44 from FoamyGuy/circle_and_dot_fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
@mikeysklar mikeysklar mentioned this pull request Jan 29, 2025
@FoamyGuy FoamyGuy mentioned this pull request Feb 3, 2025
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.

On QT Py - OverflowError: No long integer support
2 participants