adafruit / Adafruit_TSL2591_Library

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

calculateLux return value in case of overflow #21

Closed jaimealemany closed 5 years ago

jaimealemany commented 6 years ago

The original (0) value does not seem a good return value in case of overflow. -1 seems better, as it is not a valid lux return value.

NuclearPhoenixx commented 6 years ago

Why does 0 not look like a good return value? I think 0 is good enough, because there is never 0 light. But -1 seems to be much more distinct :D

NuclearPhoenixx commented 6 years ago

By the way you should redo the .github/PULL_REQUEST_TEMPLATE.md file!

jaimealemany commented 6 years ago

Even if there was never 0 light, the calculation has 0 as a valid return - depending on the sensitivity and exposure time settings, it is a value to be expected. So 0 is a valid return, thus overflow has to be signaled some other way, imho.

jaimealemany commented 5 years ago

Great, thanks!