add tcs light value less than 65535 check
This commit is contained in:
parent
dbaf926def
commit
5bc41fcf21
|
@ -924,7 +924,7 @@ void loop_TCS34725_lux()
|
|||
}
|
||||
//value_tcs_lux = tcs.calculateLux(value_tcs_r, value_tcs_g, value_tcs_b);
|
||||
uint16_t _value_tcs_lux = tcs.lux*TCS34725_LUXFACTOR;
|
||||
if (!tcs.isSaturated){ //sometimes false high reading accur around 65535 sometimes less.
|
||||
if (!tcs.isSaturated && _value_tcs_lux<65535){ //sometimes false high reading accur around 65535 sometimes less. with isSaturated check only 65535 values appeared.
|
||||
value_tcs_lux = _value_tcs_lux;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue