mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-05 20:38:27 +02:00
sen5x fix temperature compensation and gas tuning (#4901)
This commit is contained in:
@@ -201,13 +201,19 @@ void SEN5XComponent::setup() {
|
||||
ESP_LOGE(TAG, "Failed to read RHT Acceleration mode");
|
||||
}
|
||||
}
|
||||
if (this->voc_tuning_params_.has_value())
|
||||
if (this->voc_tuning_params_.has_value()) {
|
||||
this->write_tuning_parameters_(SEN5X_CMD_VOC_ALGORITHM_TUNING, this->voc_tuning_params_.value());
|
||||
if (this->nox_tuning_params_.has_value())
|
||||
delay(20);
|
||||
}
|
||||
if (this->nox_tuning_params_.has_value()) {
|
||||
this->write_tuning_parameters_(SEN5X_CMD_NOX_ALGORITHM_TUNING, this->nox_tuning_params_.value());
|
||||
delay(20);
|
||||
}
|
||||
|
||||
if (this->temperature_compensation_.has_value())
|
||||
if (this->temperature_compensation_.has_value()) {
|
||||
this->write_temperature_compensation_(this->temperature_compensation_.value());
|
||||
delay(20);
|
||||
}
|
||||
|
||||
// Finally start sensor measurements
|
||||
auto cmd = SEN5X_CMD_START_MEASUREMENTS_RHT_ONLY;
|
||||
|
||||
Reference in New Issue
Block a user