add tcs light value less than 65535 check

This commit is contained in:
interfisch 2021-01-27 22:57:03 +01:00
parent dbaf926def
commit 5bc41fcf21
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}