adafruit / Adafruit_TSL2591_Library

This is an Arduino library for the TSL2591 digital luminosity (light) sensors.
58 stars 48 forks source link

Fix possible division by zero #44

Closed Hoiss closed 3 years ago

Hoiss commented 3 years ago

ch0 value of 0 is dangerous in calculateLuxf function.

Hoiss commented 3 years ago

Hmmm, did I do something wrong with this pull-request? I just changed line 237 in Adafruit_TSL2591.cpp but it shows 2 conflicting files with changes not from me.

ladyada commented 3 years ago

maybe best to start over with a new fork and add your changes there!

caternuson commented 3 years ago

Yep. Looks like your fork was forked from this repo: https://github.com/jocelyngirard/Adafruit_TSL2591_Library which hasn't been touched in years. So your PR is based on super old code.

Hoiss commented 3 years ago

OK, no idea how that happened, sorry. I will try it again...