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

[ms5611] remove delay in setup (#10658)

This commit is contained in:
mrtoy-me
2025-09-10 05:31:06 +10:00
committed by GitHub
parent 01ff09064d
commit 8976ea2436

View File

@@ -19,13 +19,14 @@ void MS5611Component::setup() {
this->mark_failed();
return;
}
delay(100); // NOLINT
for (uint8_t offset = 0; offset < 6; offset++) {
if (!this->read_byte_16(MS5611_CMD_READ_PROM + (offset * 2), &this->prom_[offset])) {
this->mark_failed();
return;
this->set_timeout(100, [this]() {
for (uint8_t offset = 0; offset < 6; offset++) {
if (!this->read_byte_16(MS5611_CMD_READ_PROM + (offset * 2), &this->prom_[offset])) {
this->mark_failed();
return;
}
}
}
});
}
void MS5611Component::dump_config() {
ESP_LOGCONFIG(TAG, "MS5611:");