mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-27 10:21: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();
|
||||
if (sht31Sensor.hasSensor())
|
||||
result = sht31Sensor.runOnce();
|
||||
if (ina219Sensor.hasSensor() && !ina219Sensor.isInitialized())
|
||||
result = ina219Sensor.runOnce();
|
||||
if (ina260Sensor.hasSensor() && !ina260Sensor.isInitialized())
|
||||
result = ina260Sensor.runOnce();
|
||||
}
|
||||
return result;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user