File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -437,9 +437,9 @@ uint32_t SparkFun_Ambient_Light::_calculateLux(uint16_t _lightBits){
437
437
_convPos = 0 ;
438
438
else if (_gain == 1.00 )
439
439
_convPos = 1 ;
440
- else if (_gain == .125 )
441
- _convPos = 2 ;
442
440
else if (_gain == .25 )
441
+ _convPos = 2 ;
442
+ else if (_gain == .125 )
443
443
_convPos = 3 ;
444
444
else
445
445
return UNKNOWN_ERROR;
@@ -484,13 +484,13 @@ uint16_t SparkFun_Ambient_Light::_calculateBits(uint32_t _luxVal){
484
484
// Here the gain is checked to get the position of the conversion value
485
485
// within the integration time arrays. These values also represent the bit
486
486
// values for setting the gain.
487
- if (_gain == 1 .00 )
487
+ if (_gain == 2 .00 )
488
488
_convPos = 0 ;
489
- else if (_gain == 2 .00 )
489
+ else if (_gain == 1 .00 )
490
490
_convPos = 1 ;
491
- else if (_gain == .125 )
492
- _convPos = 2 ;
493
491
else if (_gain == .25 )
492
+ _convPos = 2 ;
493
+ else if (_gain == .125 )
494
494
_convPos = 3 ;
495
495
else
496
496
return UNKNOWN_ERROR;
You can’t perform that action at this time.
0 commit comments