-
Notifications
You must be signed in to change notification settings - Fork 7
OverflowError: long int not supported in this build #4
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
Comments
hmmm....may not be able to support the small board builds. There are several large values needed internally for computing timing values as well as masking. Adafruit CircuitPython 7.2.5 on 2022-04-06; Adafruit QT Py M0 with samd21e18
>>> macro_period_us = 0x40000000
OverflowError: long int not supported in this build
>>> mask = 0xFFFFFF00
OverflowError: long int not supported in this build
>>> These were taken from the STM Arduino driver and the specifics are not documented elsewhere. So would need to figure out how to re-write this code to accommodate the small builds: Adafruit_CircuitPython_VL53L4CD/adafruit_vl53l4cd.py Lines 252 to 271 in a401767
|
Is it worth using a guard statement when importing to check for large integer support, and raise a custom exception explaining incompatibility instead? |
Maybe. The other option here, as suggested by @dhalbert, is to use reduced precision in the math. Just haven't worked out the specifics since there's a bit going on with the computations. But that might be too much of a hack just to accommodate the small int boards? |
|
For the |
I can try some of these changes and check it out. |
@tekktrik cool. thanks. i think it was some of the lines further down that gave me pause also. and didnt help that these were just translated from other source. i don't think i found any other documentation describing what is being done, which could have also helped to potentially just reimplement in some other way. |
neat. this got fixed. @FoamyGuy thanks! |
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 14, in
OverflowError: long int not supported in this build
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 7.2.4 on 2022-03-31; Adafruit QT Py M0 with samd21e18
The text was updated successfully, but these errors were encountered: