From 14b31d4d1461af53818668cb9046b825fee66333 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 8 Dec 2023 19:26:37 -0600 Subject: [PATCH] Fix INA sensor dual use between environment telem and device battery reading (#3002) --- src/modules/Telemetry/EnvironmentTelemetry.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/Telemetry/EnvironmentTelemetry.cpp b/src/modules/Telemetry/EnvironmentTelemetry.cpp index 1047ade1d..9c7b406e9 100644 --- a/src/modules/Telemetry/EnvironmentTelemetry.cpp +++ b/src/modules/Telemetry/EnvironmentTelemetry.cpp @@ -97,9 +97,9 @@ int32_t EnvironmentTelemetryModule::runOnce() result = lps22hbSensor.runOnce(); if (sht31Sensor.hasSensor()) result = sht31Sensor.runOnce(); - if (ina219Sensor.hasSensor() && !ina219Sensor.isInitialized()) + if (ina219Sensor.hasSensor()) result = ina219Sensor.runOnce(); - if (ina260Sensor.hasSensor() && !ina260Sensor.isInitialized()) + if (ina260Sensor.hasSensor()) result = ina260Sensor.runOnce(); } return result;