From ecf87fd18442bed50f5f4ad753d8d1e266d288c2 Mon Sep 17 00:00:00 2001 From: nebman Date: Sat, 2 Nov 2024 00:46:26 +0100 Subject: [PATCH] INA219 charging detection minimal implementation: if there is a configured INA219 sensor for battery monitoring we can take the current flow across the shunt resistor to know if we are charging the battery - negative milliamps indicate charging --- src/Power.cpp | 2 +- src/modules/Telemetry/Sensor/INA219Sensor.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Power.cpp b/src/Power.cpp index 670e9804d..8e524369d 100644 --- a/src/Power.cpp +++ b/src/Power.cpp @@ -1176,4 +1176,4 @@ bool Power::lipoInit() { return false; } -#endif \ No newline at end of file +#endif diff --git a/src/modules/Telemetry/Sensor/INA219Sensor.h b/src/modules/Telemetry/Sensor/INA219Sensor.h index dff62d79a..18bfd93f7 100644 --- a/src/modules/Telemetry/Sensor/INA219Sensor.h +++ b/src/modules/Telemetry/Sensor/INA219Sensor.h @@ -24,4 +24,4 @@ class INA219Sensor : public TelemetrySensor, VoltageSensor, CurrentSensor virtual int16_t getCurrentMa() override; }; -#endif \ No newline at end of file +#endif