mirror of
https://github.com/esphome/esphome.git
synced 2025-09-06 13:22:19 +01:00
DHT platform now supports modules with inbuilt external resistor (#8257)
This commit is contained in:
@@ -23,6 +23,7 @@ void DHT::dump_config() {
|
||||
} else {
|
||||
ESP_LOGCONFIG(TAG, " Model: DHT22 (or equivalent)");
|
||||
}
|
||||
ESP_LOGCONFIG(TAG, " Internal Pull-up: %s", ONOFF(this->pin_->get_flags() & gpio::FLAG_PULLUP));
|
||||
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
|
||||
@@ -101,7 +102,7 @@ bool HOT IRAM_ATTR DHT::read_sensor_(float *temperature, float *humidity, bool r
|
||||
} else {
|
||||
delayMicroseconds(800);
|
||||
}
|
||||
this->pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);
|
||||
this->pin_->pin_mode(this->pin_->get_flags());
|
||||
|
||||
{
|
||||
InterruptLock lock;
|
||||
|
Reference in New Issue
Block a user