diff --git a/Adafruit_TSL2591.cpp b/Adafruit_TSL2591.cpp index 0b94bb1..8cc07e2 100644 --- a/Adafruit_TSL2591.cpp +++ b/Adafruit_TSL2591.cpp @@ -219,8 +219,7 @@ tsl2591IntegrationTime_t Adafruit_TSL2591::getTiming() { return _integration; } /**************************************************************************/ float Adafruit_TSL2591::calculateLux(uint16_t ch0, uint16_t ch1) { float atime, again; - float cpl, lux1, lux2, lux; - uint32_t chan0, chan1; + float cpl, lux; // Check for overflow conditions first if ((ch0 == 0xFFFF) | (ch1 == 0xFFFF)) { @@ -277,8 +276,8 @@ float Adafruit_TSL2591::calculateLux(uint16_t ch0, uint16_t ch1) { cpl = (atime * again) / TSL2591_LUX_DF; // Original lux calculation (for reference sake) - // lux1 = ( (float)ch0 - (TSL2591_LUX_COEFB * (float)ch1) ) / cpl; - // lux2 = ( ( TSL2591_LUX_COEFC * (float)ch0 ) - ( TSL2591_LUX_COEFD * + // float lux1 = ( (float)ch0 - (TSL2591_LUX_COEFB * (float)ch1) ) / cpl; + // float lux2 = ( ( TSL2591_LUX_COEFC * (float)ch0 ) - ( TSL2591_LUX_COEFD * // (float)ch1 ) ) / cpl; lux = lux1 > lux2 ? lux1 : lux2; // Alternate lux calculation 1 diff --git a/library.properties b/library.properties index b7efd0d..43e8633 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Adafruit TSL2591 Library -version=1.4.2 +version=1.4.3 author=Adafruit maintainer=Adafruit sentence=Library for the TSL2591 digital luminosity (light) sensors.