mirror of
https://github.com/esphome/esphome.git
synced 2024-11-16 10:45:48 +01:00
Fix error reporting for DHT bit read loop (#2344)
This commit is contained in:
parent
5f21b925da
commit
82eca13d7b
@ -122,6 +122,8 @@ bool HOT ICACHE_RAM_ATTR DHT::read_sensor_(float *temperature, float *humidity,
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (error_code != 0)
|
||||
break;
|
||||
|
||||
start_time = micros();
|
||||
uint32_t end_time = start_time;
|
||||
@ -136,6 +138,8 @@ bool HOT ICACHE_RAM_ATTR DHT::read_sensor_(float *temperature, float *humidity,
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (error_code != 0)
|
||||
break;
|
||||
|
||||
if (i < 0)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user