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:
Lazar Obradovic 2019-10-17 22:58:59 +04:00 committed by Otto Winter
parent 3bb6430495
commit 1242f43769

View file

@ -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;