mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 10:12:50 +00:00
Check if hasSensor an run if not initialized (#2613)
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user