Updated charge status

This commit is contained in:
Mark Qvist 2024-10-11 10:21:10 +02:00
parent 2ede362cb3
commit 335c6cbc5c
1 changed files with 5 additions and 1 deletions

View File

@ -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) {