mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 00:48:19 +01:00
Use NAN values for TSL2591 saturation (#3931)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
parent
0b0984f9a0
commit
b76c7a0131
1 changed files with 2 additions and 2 deletions
|
@ -347,8 +347,8 @@ float TSL2591Component::get_calculated_lux(uint16_t full_spectrum, uint16_t infr
|
|||
uint16_t max_count = (this->integration_time_ == TSL2591_INTEGRATION_TIME_100MS ? 36863 : 65535);
|
||||
if ((full_spectrum == max_count) || (infrared == max_count)) {
|
||||
// Signal an overflow
|
||||
ESP_LOGW(TAG, "Apparent saturation on TSL2591 (%s). You could reduce the gain.", this->name_);
|
||||
return -1.0F;
|
||||
ESP_LOGW(TAG, "Apparent saturation on TSL2591 (%s). You could reduce the gain or integration time.", this->name_);
|
||||
return NAN;
|
||||
}
|
||||
|
||||
if ((full_spectrum == 0) && (infrared == 0)) {
|
||||
|
|
Loading…
Reference in a new issue