summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarry Wardell <rockbox@barrywardell.net>2006-11-15 21:41:17 +0000
committerBarry Wardell <rockbox@barrywardell.net>2006-11-15 21:41:17 +0000
commit407284818411f82419679d39686f5402596f3725 (patch)
treeaec0072c73650688ea198958355894223994b596
parent77b615344cbb24e80ae05944757a5be66cd1f41d (diff)
downloadrockbox-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.c7
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)
852 * battery_centivolts is the centivolt-scaled filtered battery value. 852 * battery_centivolts is the centivolt-scaled filtered battery value.
853 */ 853 */
854 battery_centivolts = (avgbat / BATT_AVE_SAMPLES + 5000) / 10000; 854 battery_centivolts = (avgbat / BATT_AVE_SAMPLES + 5000) / 10000;
855
856 /* update battery status every time an update is available */
857 battery_status_update();
855 } 858 }
856 else if (battery_percent < 8) { 859 else if (battery_percent < 8) {
857 /* If battery is low, observe voltage during disk activity. 860 /* If battery is low, observe voltage during disk activity.
@@ -860,6 +863,10 @@ static void power_thread_sleep(int ticks)
860 */ 863 */
861 battery_centivolts = (battery_adc_voltage() + 864 battery_centivolts = (battery_adc_voltage() +
862 battery_centivolts + 1) / 2; 865 battery_centivolts + 1) / 2;
866
867 /* update battery status every time an update is available */
868 battery_status_update();
869
863#if (CONFIG_BATTERY!=BATT_4AA_NIMH) && (CONFIG_BATTERY!=BATT_3AAA)&& \ 870#if (CONFIG_BATTERY!=BATT_4AA_NIMH) && (CONFIG_BATTERY!=BATT_3AAA)&& \
864 (CONFIG_BATTERY!=BATT_1AA) 871 (CONFIG_BATTERY!=BATT_1AA)
865 if (!shutdown_timeout && 872 if (!shutdown_timeout &&