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){
437437 _convPos = 0 ;
438438 else if (_gain == 1.00 )
439439 _convPos = 1 ;
440- else if (_gain == .125 )
441- _convPos = 2 ;
442440 else if (_gain == .25 )
441+ _convPos = 2 ;
442+ else if (_gain == .125 )
443443 _convPos = 3 ;
444444 else
445445 return UNKNOWN_ERROR;
@@ -484,13 +484,13 @@ uint16_t SparkFun_Ambient_Light::_calculateBits(uint32_t _luxVal){
484484 // Here the gain is checked to get the position of the conversion value
485485 // within the integration time arrays. These values also represent the bit
486486 // values for setting the gain.
487- if (_gain == 1 .00 )
487+ if (_gain == 2 .00 )
488488 _convPos = 0 ;
489- else if (_gain == 2 .00 )
489+ else if (_gain == 1 .00 )
490490 _convPos = 1 ;
491- else if (_gain == .125 )
492- _convPos = 2 ;
493491 else if (_gain == .25 )
492+ _convPos = 2 ;
493+ else if (_gain == .125 )
494494 _convPos = 3 ;
495495 else
496496 return UNKNOWN_ERROR;
You can’t perform that action at this time.
0 commit comments