1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-13 22:28:14 +00:00

Cosmetic: clang tidy fix

This commit is contained in:
Andrew J.Swan 2025-02-21 12:57:08 +02:00
parent aff853e411
commit f4eaac33f9

View File

@ -29,14 +29,14 @@ void PM2005Component::update() {
if (sensor_situation_ != data_buffer_[SITUATION_VALUE_INDEX]) {
sensor_situation_ = data_buffer_[SITUATION_VALUE_INDEX];
if (sensor_situation_ == 1)
if (sensor_situation_ == 1) {
ESP_LOGD(TAG, "Sensor situation: Close.");
else if (sensor_situation_ == 2) {
} else if (sensor_situation_ == 2) {
ESP_LOGD(TAG, "Sensor situation: Malfunction.");
this->status_set_warning();
} else if (sensor_situation_ == 3)
} else if (sensor_situation_ == 3) {
ESP_LOGD(TAG, "Sensor situation: Under detecting.");
else if (sensor_situation_ == 0x80) {
} else if (sensor_situation_ == 0x80) {
ESP_LOGD(TAG, "Sensor situation: Detecting completed.");
if (this->pm_1_0_sensor_ != nullptr) {
@ -58,13 +58,13 @@ void PM2005Component::update() {
}
uint16_t sensor_measuring_mode = get_sensor_value_(data_buffer_, MEASURING_VALUE_INDEX);
;
if (sensor_measuring_mode == 2)
if (sensor_measuring_mode == 2) {
ESP_LOGD(TAG, "The measuring mode of sensor: Single measuring mode.");
else if (sensor_measuring_mode == 3)
} else if (sensor_measuring_mode == 3) {
ESP_LOGD(TAG, "The measuring mode of sensor: Continuous measuring mode.");
else if (sensor_measuring_mode == 5)
} else if (sensor_measuring_mode == 5) {
ESP_LOGD(TAG, "The measuring mode of sensor: Dynamic measuring mode.");
}
this->status_clear_warning();
}