mobe warm-up of bme280

This commit is contained in:
Joerg Lehmann 2019-07-10 17:22:34 +02:00
parent c9875123f4
commit 59f6a1c0b9
1 changed files with 3 additions and 4 deletions

View File

@ -429,10 +429,6 @@ void setup_uplink(void)
else {
gLed.Set(LedPattern::Joining);
/* warm up the BME280 by discarding a measurement */
if (fBme)
(void)gBME280.readTemperature();
/* trigger a join by sending the first packet */
ReadSensors(true, false);
}
@ -588,6 +584,9 @@ void ReadSensors(bool firstTime, bool readOnly)
uint16_t weight_last;
if (fBme) {
/* warm up the BME280 by discarding a measurement */
(void)gBME280.readTemperature();
Adafruit_BME280::Measurements m = gBME280.readTemperaturePressureHumidity();
// temperature is 2 bytes from -0x80.00 to +0x7F.FF degrees C
// pressure is 2 bytes, hPa * 10.