allow sensors connected to second I2C port (#2891)

This commit is contained in:
Manuel
2023-10-15 02:33:45 +02:00
committed by GitHub
parent f4b40562d3
commit 142d56c663
21 changed files with 40 additions and 33 deletions

View File

@@ -13,8 +13,8 @@ int32_t INA219Sensor::runOnce()
return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;
}
if (!ina219.success()) {
ina219 = Adafruit_INA219(nodeTelemetrySensorsMap[sensorType]);
status = ina219.begin();
ina219 = Adafruit_INA219(nodeTelemetrySensorsMap[sensorType].first);
status = ina219.begin(nodeTelemetrySensorsMap[sensorType].second);
} else {
status = ina219.success();
}