Skip to content

Added interim over/underflow protection #16

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
Nov 27, 2018

Conversation

microbuilder
Copy link

This is related to #10 and #14, which should resolve divide by zero and 8-bit overflow conditions.

However, there are some fundamental problems with the algorithm(s) used here such as negative lux values being possible, and what appears to be a somewhat arbitrary conversion to 24-bit RGB color. I've previously implemented more accurate algorithms for these kinds of conversions, but this will require some work to port to CP and this PR will at least solve the current 0 and >255 issue as an interim solution.

@caternuson
Copy link
Contributor

Looks good to me. A simple fix for now. I suggest we merge and close #10 and #14.

@ladyada ladyada merged commit 3300a31 into adafruit:master Nov 27, 2018
@ladyada
Copy link
Member

ladyada commented Nov 27, 2018

merged!

tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 28, 2018
Updating https://github.com/adafruit/Adafruit_CircuitPython_Se to 1.2.6 from 1.2.5:
  > DM: add delay for analog write on raspberry pi

Updating https://github.com/adafruit/Adafruit_CircuitPython_TCS34725 to 3.1.2 from 3.1.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_TCS34725#16 from microbuilder/overflowfix

Updating https://github.com/adafruit/Adafruit_CircuitPython_HID to 3.3.1 from 3.3.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_HID#28 from dhalbert/consumer_control-mute
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