mirror of
https://github.com/esphome/esphome.git
synced 2024-12-23 05:54:56 +01:00
Remove unnecessary write in AHT10 update (#2675)
This commit is contained in:
parent
335e69e6cd
commit
598f5b241f
1 changed files with 0 additions and 7 deletions
|
@ -73,13 +73,6 @@ void AHT10Component::update() {
|
||||||
bool success = false;
|
bool success = false;
|
||||||
for (int i = 0; i < AHT10_ATTEMPTS; ++i) {
|
for (int i = 0; i < AHT10_ATTEMPTS; ++i) {
|
||||||
ESP_LOGVV(TAG, "Attempt %d at %6u", i, millis());
|
ESP_LOGVV(TAG, "Attempt %d at %6u", i, millis());
|
||||||
delayMicroseconds(4);
|
|
||||||
|
|
||||||
uint8_t reg = 0;
|
|
||||||
if (this->write(®, 1) != i2c::ERROR_OK) {
|
|
||||||
ESP_LOGD(TAG, "Communication with AHT10 failed, waiting...");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
delay(delay_ms);
|
delay(delay_ms);
|
||||||
if (this->read(data, 6) != i2c::ERROR_OK) {
|
if (this->read(data, 6) != i2c::ERROR_OK) {
|
||||||
ESP_LOGD(TAG, "Communication with AHT10 failed, waiting...");
|
ESP_LOGD(TAG, "Communication with AHT10 failed, waiting...");
|
||||||
|
|
Loading…
Reference in a new issue