Skip to content

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

3 participants