Compare commits

..

No commits in common. "1ab93e04d5a308ba5d28feac30d77cb4512a0f79" and "e54d259241aaa9ef858e3ebb519118f2571297a6" have entirely different histories.

3 changed files with 1 additions and 11 deletions

View File

@ -476,9 +476,6 @@ class AnalogBatteryLevel : public HasBatteryLevel
int16_t getINACurrent() {
if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA219].first == config.power.device_battery_ina_address) {
return ina219Sensor.getCurrentMa();
} else if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA3221].first ==
config.power.device_battery_ina_address) {
return ina3221Sensor.getCurrentMa();
}
return 0;
}

View File

@ -102,9 +102,4 @@ uint16_t INA3221Sensor::getBusVoltageMv()
return lround(ina3221.getVoltage(BAT_CH) * 1000);
}
int16_t INA3221Sensor::getCurrentMa()
{
return lround(ina3221.getCurrent(BAT_CH));
}
#endif

View File

@ -5,10 +5,9 @@
#include "../mesh/generated/meshtastic/telemetry.pb.h"
#include "TelemetrySensor.h"
#include "VoltageSensor.h"
#include "CurrentSensor.h"
#include <INA3221.h>
class INA3221Sensor : public TelemetrySensor, VoltageSensor, CurrentSensor
class INA3221Sensor : public TelemetrySensor, VoltageSensor
{
private:
INA3221 ina3221 = INA3221(INA3221_ADDR42_SDA);
@ -36,7 +35,6 @@ class INA3221Sensor : public TelemetrySensor, VoltageSensor, CurrentSensor
int32_t runOnce() override;
bool getMetrics(meshtastic_Telemetry *measurement) override;
virtual uint16_t getBusVoltageMv() override;
virtual int16_t getCurrentMa() override;
};
struct _INA3221Measurement {