Skip to content

Commit 1b33f9f

Browse files
committed
Changes index of GAIN selection when calculating LUX
1 parent b7cd86d commit 1b33f9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SparkFun_VEML6030_Ambient_Light_Sensor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,9 @@ uint32_t SparkFun_Ambient_Light::_calculateLux(uint16_t _lightBits){
433433
// Here the gain is checked to get the position of the conversion value
434434
// within the integration time arrays. These values also represent the bit
435435
// values for setting the gain.
436-
if (_gain == 1.00)
436+
if (_gain == 2.00)
437437
_convPos = 0;
438-
else if (_gain == 2.00)
438+
else if (_gain == 1.00)
439439
_convPos = 1;
440440
else if (_gain == .125)
441441
_convPos = 2;

0 commit comments

Comments
 (0)