mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 08:55:22 +01:00
BME280: Increase sensor timeout (#727)
I'm facing some occasional timeouts when reading BME280. Looking at Adafruit driver (that this code is based on), I see that base math is using 1.25ms, increased by 2.3*oversampliing + 0.575 for each value being read. I've added 1.5ms as baseline, to be on the same safe.
This commit is contained in:
parent
3bb6430495
commit
1242f43769
1 changed files with 1 additions and 1 deletions
|
@ -178,7 +178,7 @@ void BME280Component::update() {
|
|||
return;
|
||||
}
|
||||
|
||||
float meas_time = 1;
|
||||
float meas_time = 1.5;
|
||||
meas_time += 2.3f * oversampling_to_time(this->temperature_oversampling_);
|
||||
meas_time += 2.3f * oversampling_to_time(this->pressure_oversampling_) + 0.575f;
|
||||
meas_time += 2.3f * oversampling_to_time(this->humidity_oversampling_) + 0.575f;
|
||||
|
|
Loading…
Reference in a new issue