From 407284818411f82419679d39686f5402596f3725 Mon Sep 17 00:00:00 2001 From: Barry Wardell Date: Wed, 15 Nov 2006 21:41:17 +0000 Subject: 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 --- firmware/powermgmt.c | 7 +++++++ 1 file changed, 7 insertions(+) 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 && -- cgit v1.2.3