diff options
-rw-r--r-- | apps/settings_menu.c | 2 | ||||
-rw-r--r-- | firmware/powermgmt.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/apps/settings_menu.c b/apps/settings_menu.c index fbc1ad162a..9e7320eef6 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c @@ -463,7 +463,7 @@ static bool trickle_charge(void) { bool result; result = set_bool( str(LANG_TRICKLE_CHARGE), &global_settings.trickle_charge ); - enable_trickle_charge(result); + enable_trickle_charge(global_settings.trickle_charge); return result; } #endif diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 49c27d93d6..7dcecb1e68 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -422,6 +422,8 @@ static void power_thread(void) trickle_sec = CURRENT_NORMAL * 60 / CURRENT_CHARGING; /* first guess, maybe consider if LED backlight is on, disk is active,... */ trickle_time = 0; charge_state = 2; /* 0: decharging/charger off, 1: charge, 2: top-off, 3: trickle */ + } else { + charge_state = 0; /* 0: decharging/charger off, 1: charge, 2: top-off, 3: trickle */ } } else { /* if we didn't disable the charger in the previous test, check for low positive delta */ @@ -444,6 +446,8 @@ static void power_thread(void) trickle_sec = CURRENT_NORMAL * 60 / CURRENT_CHARGING; /* first guess, maybe consider if LED backlight is on, disk is active,... */ trickle_time = 0; charge_state = 2; /* 0: decharging/charger off, 1: charge, 2: top-off, 3: trickle */ + } else { + charge_state = 0; /* 0: decharging/charger off, 1: charge, 2: top-off, 3: trickle */ } } } |