1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 19:32:19 +01:00

[dht] clang-tidy fixes for #7822 (#7871)

This commit is contained in:
Keith Burzinski
2024-11-27 16:25:15 -06:00
committed by GitHub
parent 7aa3a1a1cc
commit ff5004d7db

View File

@@ -135,7 +135,8 @@ bool HOT IRAM_ATTR DHT::read_sensor_(float *temperature, float *humidity, bool r
// Wait for falling edge
while (this->pin_->digital_read()) {
if ((end_time = micros()) - start_time > 90) {
end_time = micros();
if (end_time - start_time > 90) {
if (i < 0) {
error_code = 3;
} else {