Index: apps/gui/statusbar.c
===================================================================
RCS file: /cvsroot/rockbox/apps/gui/statusbar.c,v
retrieving revision 1.23
diff -u -3 -p -r1.23 statusbar.c
--- apps/gui/statusbar.c	2 Mar 2006 13:37:50 -0000	1.23
+++ apps/gui/statusbar.c	11 Mar 2006 19:37:24 -0000
@@ -177,7 +177,9 @@ void gui_statusbar_draw(struct gui_statu
     {
 #endif /* HAVE_LCD_BITMAP */
 
-#ifdef HAVE_CHARGING
+/* We probably don't want to display the animated charging indicator unless
+ * we can't tell the current charge state while charging. */
+#if defined(HAVE_CHARGING) && !defined(HAVE_CHARGE_STATE)
         if (bar->info.inserted) {
             battery_state = true;
 #if defined(HAVE_CHARGE_CTRL) || \
@@ -329,7 +331,7 @@ void gui_statusbar_icon_battery(struct s
     if (fill > 100)
         fill = 100;
 
-#if (defined(HAVE_CHARGE_CTRL) || defined(HAVE_CHARGE_STATE)) && \
+#if defined(HAVE_CHARGE_CTRL) && \
     !defined(SIMULATOR) /* Certain charge controlled targets */
     /* show graphical animation when charging instead of numbers */
     if ((global_settings.battery_display) &&
Index: firmware/powermgmt.c
===================================================================
RCS file: /cvsroot/rockbox/firmware/powermgmt.c,v
retrieving revision 1.103
diff -u -3 -p -r1.103 powermgmt.c
--- firmware/powermgmt.c	4 Mar 2006 09:48:53 -0000	1.103
+++ firmware/powermgmt.c	11 Mar 2006 19:37:24 -0000
@@ -140,7 +140,8 @@ static const short percent_to_volt_disch
     { 310, 355, 363, 369, 372, 374, 376, 378, 380, 386, 405 }  /* NiMH */
 #elif CONFIG_BATTERY == BATT_LIPOL1300
     /* Below 337 the backlight starts flickering during HD access */
-    { 337, 358, 365, 369, 372, 377, 383, 389, 397, 406, 413 }
+//  { 337, 358, 365, 369, 372, 377, 383, 389, 397, 406, 413 }
+    { 337, 366, 372, 374, 378, 381, 385, 392, 399, 408, 417 }
 #else /* NiMH */
     /* original values were taken directly after charging, but it should show
        100% after turning off the device for some hours, too */
@@ -156,7 +157,7 @@ charger_input_state_type charger_input_s
 static const short percent_to_volt_charge[11] =
 {
 #if CONFIG_BATTERY == BATT_LIPOL1300
-    340, 349, 358, 367, 376, 385, 394, 403, 408, 413, 418 /* Estimated */
+    340, 390, 394, 399, 400, 402, 406, 408, 414, 417, 423
 #else
     /* values guessed, see
        http://www.seattlerobotics.org/encoder/200210/LiIon2.pdf until someone
@@ -533,8 +534,8 @@ static void power_thread_sleep(int ticks
 #ifdef HAVE_CHARGE_STATE
         switch (charger_input_state) {
             case CHARGER_UNPLUGGED:
-                charge_state = DISCHARGING;
             case NO_CHARGER:
+                charge_state = DISCHARGING;
                 break;
             case CHARGER_PLUGGED:
             case CHARGER:
Index: firmware/export/config-h120.h
===================================================================
RCS file: /cvsroot/rockbox/firmware/export/config-h120.h,v
retrieving revision 1.26
diff -u -3 -p -r1.26 config-h120.h
--- firmware/export/config-h120.h	17 Feb 2006 22:38:38 -0000	1.26
+++ firmware/export/config-h120.h	11 Mar 2006 19:37:24 -0000
@@ -73,6 +73,9 @@
 /* Define this if the platform can charge batteries */
 #define HAVE_CHARGING 1
 
+/* For units with a hardware charger that reports charge state */
+#define HAVE_CHARGE_STATE 1
+
 /* define this if the hardware can be powered off while charging */
 #define HAVE_POWEROFF_WHILE_CHARGING
 
Index: firmware/export/config-h100.h
===================================================================
RCS file: /cvsroot/rockbox/firmware/export/config-h100.h,v
retrieving revision 1.64
diff -u -3 -p -r1.64 config-h100.h
--- firmware/export/config-h100.h	17 Feb 2006 22:38:38 -0000	1.64
+++ firmware/export/config-h100.h	11 Mar 2006 19:37:24 -0000
@@ -78,6 +78,9 @@
 /* Define this if the platform can charge batteries */
 #define HAVE_CHARGING 1
 
+/* For units with a hardware charger that reports charge state */
+#define HAVE_CHARGE_STATE 1
+
 /* define this if the hardware can be powered off while charging */
 #define HAVE_POWEROFF_WHILE_CHARGING
 
Index: firmware/drivers/power.c
===================================================================
RCS file: /cvsroot/rockbox/firmware/drivers/power.c,v
retrieving revision 1.77
diff -u -3 -p -r1.77 power.c
--- firmware/drivers/power.c	5 Mar 2006 18:06:06 -0000	1.77
+++ firmware/drivers/power.c	11 Mar 2006 19:37:24 -0000
@@ -150,8 +150,13 @@ void charger_enable(bool on)
 #endif
 
 #ifdef HAVE_CHARGE_STATE
+/* Returns true if the unit is charging the batteries. */
 bool charging_state(void) {
+#if defined(IRIVER_H100_SERIES)
+    return true;
+#else /* Iriver H300 */
     return (GPIO_READ & 0x00800000)?true:false;
+#endif
 }
 #endif
 
