From 335c6cbc5cb01e0126976663037f280b814d5041 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Fri, 11 Oct 2024 10:21:10 +0200 Subject: [PATCH] Updated charge status --- Power.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Power.h b/Power.h index 71f81a3..1a3dd75 100644 --- a/Power.h +++ b/Power.h @@ -155,7 +155,11 @@ void measure_battery() { if (bat_voltage_dropping && battery_voltage < BAT_V_FLOAT) { battery_state = BATTERY_STATE_DISCHARGING; } else { - battery_state = BATTERY_STATE_CHARGING; + if (battery_percent < 100.0) { + battery_state = BATTERY_STATE_CHARGING; + } else { + battery_state = BATTERY_STATE_CHARGED; + } } // if (bt_state == BT_STATE_CONNECTED) {