1
0
mirror of https://github.com/sjlongland/cluster-powerctl.git synced 2025-09-14 04:23:15 +10:00

powerctl: In CHARGE_WAIT state, reset if battery improving.

This commit is contained in:
Stuart Longland 2017-03-19 11:23:57 +10:00
parent dec958e9ca
commit 3969248610
Signed by: stuartl
GPG Key ID: F954BBBB7948D546

View File

@ -317,6 +317,12 @@ static void charge_wait() {
/* Expire timer */ /* Expire timer */
t_charger = 0; t_charger = 0;
if (v_bn_adc > v_bl_adc) {
/* Things are improving, so kill the warning */
charger_warning = 0;
t_cwarn = 0;
}
#ifdef DEBUG #ifdef DEBUG
uart_tx_bool(STR_T_CHARGER, !t_charger); uart_tx_bool(STR_T_CHARGER, !t_charger);
#endif #endif