mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Re-merging 92c2963
This commit is contained in:
parent
9fe218e0d8
commit
33d5f85556
1 changed files with 4 additions and 5 deletions
|
|
@ -18,8 +18,7 @@ static const Module::RfSwitchMode_t rfswitch_table[] = {
|
|||
};
|
||||
|
||||
VolatileRTCClock rtc_clock;
|
||||
BME280I2C bme;
|
||||
WIOE5SensorManager sensors(bme);
|
||||
WIOE5SensorManager sensors;
|
||||
|
||||
#ifndef LORA_CR
|
||||
#define LORA_CR 5
|
||||
|
|
@ -73,9 +72,9 @@ bool WIOE5SensorManager::querySensors(uint8_t requester_permissions, CayenneLPP&
|
|||
float temp(NAN), hum(NAN), pres(NAN);
|
||||
|
||||
BME280::TempUnit tempUnit(BME280::TempUnit_Celsius);
|
||||
BME280::PresUnit presUnit(BME280::PresUnit_bar);
|
||||
BME280::PresUnit presUnit(BME280::PresUnit_hPa);
|
||||
|
||||
_bme->read(pres, temp, hum, tempUnit, presUnit);
|
||||
bme.read(pres, temp, hum, tempUnit, presUnit);
|
||||
|
||||
telemetry.addTemperature(TELEM_CHANNEL_SELF, temp);
|
||||
telemetry.addRelativeHumidity(TELEM_CHANNEL_SELF, hum);
|
||||
|
|
@ -85,7 +84,7 @@ bool WIOE5SensorManager::querySensors(uint8_t requester_permissions, CayenneLPP&
|
|||
}
|
||||
|
||||
bool WIOE5SensorManager::begin() {
|
||||
has_bme = _bme->begin();
|
||||
has_bme = bme.begin();
|
||||
|
||||
return has_bme;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue