Jelajahi Sumber

fix build warnings as errors with esp32:esp32 2.0.4

brentru 3 tahun lalu
induk
melakukan
4feccfeed4
2 mengubah file dengan 4 tambahan dan 5 penghapusan
  1. 3 4
      Adafruit_TSL2591.cpp
  2. 1 1
      library.properties

+ 3 - 4
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

+ 1 - 1
library.properties

@@ -1,5 +1,5 @@
 name=Adafruit TSL2591 Library
-version=1.4.2
+version=1.4.3
 author=Adafruit
 maintainer=Adafruit <info@adafruit.com>
 sentence=Library for the TSL2591 digital luminosity (light) sensors.