mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 08:28:12 +01:00
Avoid unnecessary waits to stabilize the VOC algorithm (#1834)
This commit is contained in:
parent
ebadaa9660
commit
80ad784a4e
1 changed files with 2 additions and 1 deletions
|
@ -220,7 +220,8 @@ void SGP40Component::update() {
|
||||||
|
|
||||||
uint32_t voc_index = this->measure_voc_index_();
|
uint32_t voc_index = this->measure_voc_index_();
|
||||||
|
|
||||||
if (this->samples_read_++ < this->samples_to_stabalize_) {
|
if (this->samples_read_ < this->samples_to_stabalize_) {
|
||||||
|
this->samples_read_++;
|
||||||
ESP_LOGD(TAG, "Sensor has not collected enough samples yet. (%d/%d) VOC index is: %u", this->samples_read_,
|
ESP_LOGD(TAG, "Sensor has not collected enough samples yet. (%d/%d) VOC index is: %u", this->samples_read_,
|
||||||
this->samples_to_stabalize_, voc_index);
|
this->samples_to_stabalize_, voc_index);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue