All pastes #249474 Raw Edit

Mine

public text v1 · immutable
#249474 ·published 2006-11-15 20:34 UTC
rendered paste body
Index: firmware/powermgmt.c
===================================================================
RCS file: /cvsroot/rockbox/firmware/powermgmt.c,v
retrieving revision 1.131
diff -u -r1.131 powermgmt.c
--- firmware/powermgmt.c	11 Nov 2006 01:18:57 -0000	1.131
+++ firmware/powermgmt.c	15 Nov 2006 20:31:50 -0000
@@ -860,6 +860,9 @@
              * 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.
@@ -868,6 +871,10 @@
              */
             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 &&