mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 09:18:00 +01:00
increased boolean readability
This commit is contained in:
parent
f3ec1ed43a
commit
27c8793976
1 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ void DHT::dump_config() {
|
||||||
ESP_LOGCONFIG(TAG, " Model: DHT22 (or equivalent)");
|
ESP_LOGCONFIG(TAG, " Model: DHT22 (or equivalent)");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->use_internal_pullup_ == true) {
|
if (this->use_internal_pullup_) {
|
||||||
ESP_LOGCONFIG(TAG, " Internal pull-up resistor enabled.");
|
ESP_LOGCONFIG(TAG, " Internal pull-up resistor enabled.");
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGCONFIG(TAG, " Internal pull-up resistor disabled.");
|
ESP_LOGCONFIG(TAG, " Internal pull-up resistor disabled.");
|
||||||
|
@ -108,7 +108,7 @@ bool HOT IRAM_ATTR DHT::read_sensor_(float *temperature, float *humidity, bool r
|
||||||
delayMicroseconds(800);
|
delayMicroseconds(800);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->use_internal_pullup_ == true) {
|
if (this->use_internal_pullup_) {
|
||||||
this->pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);
|
this->pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);
|
||||||
} else {
|
} else {
|
||||||
this->pin_->pin_mode(gpio::FLAG_INPUT);
|
this->pin_->pin_mode(gpio::FLAG_INPUT);
|
||||||
|
|
Loading…
Reference in a new issue