mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-28 18:47:40 +00:00
Check if hasSensor an run if not initialized (#2613)
This commit is contained in:
parent
6d97d5dfa2
commit
e4e26a819b
@ -86,6 +86,10 @@ int32_t EnvironmentTelemetryModule::runOnce()
|
|||||||
result = lps22hbSensor.runOnce();
|
result = lps22hbSensor.runOnce();
|
||||||
if (sht31Sensor.hasSensor())
|
if (sht31Sensor.hasSensor())
|
||||||
result = sht31Sensor.runOnce();
|
result = sht31Sensor.runOnce();
|
||||||
|
if (ina219Sensor.hasSensor() && !ina219Sensor.isInitialized())
|
||||||
|
result = ina219Sensor.runOnce();
|
||||||
|
if (ina260Sensor.hasSensor() && !ina260Sensor.isInitialized())
|
||||||
|
result = ina260Sensor.runOnce();
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user