Skip to content

Ignore last 2 bits of digital input, only on boards without long ints #108

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
Jul 25, 2022

Conversation

carlfj
Copy link
Contributor

@carlfj carlfj commented Jul 25, 2022

For compatibility on boards that don't support arbitrary integers. Bit 31 and 32 are scrubbed on these boards instead of throwing OverflowError, while builds with long ints retain this extra functionality.

Previous version breaks functionality for boards like QT Py SAMD21 using NeoKey 1x4 QT I2C Breakout or ATSAMD09 Breakout with Seesaw. More details in comments of issue #107.

Closes: #107

For compatibility on boards that don't support arbitrary integers. Bit 31 and 32 are scrubbed on these boards instead of throwing OverflowError, while builds with long ints retain this extra functionality.
@jepler jepler requested a review from a team July 25, 2022 20:07
@jepler
Copy link
Contributor

jepler commented Jul 25, 2022

Thank you! I updated the description of this PR to reflect that it closes the referenced bug.

Copy link
Contributor

@Neradoc Neradoc left a comment

Choose a reason for hiding this comment

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

I tested it on a QT PY M0, though I had to do #109 first because the board does not include adafruit_pixelbuf and requires the bundle version (but that's my fault). Also still works on a RP2040 board with long ints.

@tekktrik tekktrik merged commit fefd1db into adafruit:main Jul 25, 2022
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jul 26, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_MONSTERM4SK to 0.3.9 from 0.3.8:
  > Updated setup.py, reverted release.yml

Updating https://github.com/adafruit/Adafruit_CircuitPython_Seesaw to 1.11.2 from 1.10.12:
  > Merge pull request adafruit/Adafruit_CircuitPython_seesaw#108 from carlfj/patch-1
  > Merge pull request adafruit/Adafruit_CircuitPython_seesaw#109 from Neradoc/nera-fix-pixelbuf-size
  > Merge pull request adafruit/Adafruit_CircuitPython_seesaw#106 from Neradoc/use-pixelbuf
  > Changed .env to .venv in README.rst
  > Removed duplicate-code from library pylint disable
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.

OverflowError small int overflow on QT Py SAMD21
4 participants