Skip to content

Commit

Permalink
Merge pull request #50 from brentru/fix-build-warns
Browse files Browse the repository at this point in the history
Fix build warnings treated as errors by arduino-esp32 v2.0.4
  • Loading branch information
brentru authored Jul 6, 2022
2 parents 1f1e44e + 4feccfe commit db71874
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions Adafruit_TSL2591.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Adafruit TSL2591 Library
version=1.4.2
version=1.4.3
author=Adafruit
maintainer=Adafruit <[email protected]>
sentence=Library for the TSL2591 digital luminosity (light) sensors.
Expand Down

0 comments on commit db71874

Please sign in to comment.