diff options
author | Barry Wardell <rockbox@barrywardell.net> | 2006-11-15 21:41:17 +0000 |
---|---|---|
committer | Barry Wardell <rockbox@barrywardell.net> | 2006-11-15 21:41:17 +0000 |
commit | 407284818411f82419679d39686f5402596f3725 (patch) | |
tree | aec0072c73650688ea198958355894223994b596 | |
parent | 77b615344cbb24e80ae05944757a5be66cd1f41d (diff) | |
download | rockbox-407284818411f82419679d39686f5402596f3725.tar.gz rockbox-407284818411f82419679d39686f5402596f3725.zip |
Fix FS#6322. Battery level gets updated again as it should.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11534 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/powermgmt.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 42366b0b24..17acd3d503 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -852,6 +852,9 @@ static void power_thread_sleep(int ticks) * battery_centivolts is the centivolt-scaled filtered battery value. */ battery_centivolts = (avgbat / BATT_AVE_SAMPLES + 5000) / 10000; + + /* update battery status every time an update is available */ + battery_status_update(); } else if (battery_percent < 8) { /* If battery is low, observe voltage during disk activity. @@ -860,6 +863,10 @@ static void power_thread_sleep(int ticks) */ battery_centivolts = (battery_adc_voltage() + battery_centivolts + 1) / 2; + + /* update battery status every time an update is available */ + battery_status_update(); + #if (CONFIG_BATTERY!=BATT_4AA_NIMH) && (CONFIG_BATTERY!=BATT_3AAA)&& \ (CONFIG_BATTERY!=BATT_1AA) if (!shutdown_timeout && |