Index: apps/settings_menu.c
===================================================================
RCS file: /cvsroot/rockbox/apps/settings_menu.c,v
retrieving revision 1.248
diff -u -r1.248 settings_menu.c
--- apps/settings_menu.c	30 Mar 2006 05:56:19 -0000	1.248
+++ apps/settings_menu.c	2 Apr 2006 16:19:26 -0000
@@ -913,9 +913,14 @@
  */
 static bool battery_capacity(void)
 {
+    int step;
+    if (BATTERY_CAPACITY_MAX <= 1000)
+	step = 20;
+    else
+	step = 50;
     return set_int(str(LANG_BATTERY_CAPACITY), "mAh", UNIT_MAH,
                    &global_settings.battery_capacity,
-                   &set_battery_capacity, 50, BATTERY_CAPACITY_MIN,
+                   &set_battery_capacity, step, BATTERY_CAPACITY_MIN,
                    BATTERY_CAPACITY_MAX, NULL );
 }
 
Index: firmware/powermgmt.c
===================================================================
RCS file: /cvsroot/rockbox/firmware/powermgmt.c,v
retrieving revision 1.110
diff -u -r1.110 powermgmt.c
--- firmware/powermgmt.c	27 Mar 2006 17:29:09 -0000	1.110
+++ firmware/powermgmt.c	2 Apr 2006 16:19:29 -0000
@@ -161,6 +161,8 @@
     310, 345    /* alkaline, NiHM */
 #elif CONFIG_BATTERY == BATT_LIPOL1300 /* iRiver H1x0 */
     339
+#elif CONFIG_BATTERY == BATT_LIPOL340 /* ipod nano */
+    323
 #else /* Player/recorder, NiMH */
     475
 #endif
@@ -182,6 +184,9 @@
      * for the 1300 mAh stock battery. */
 //  { 337, 358, 365, 369, 372, 377, 383, 389, 397, 406, 413 }
     { 337, 366, 372, 374, 378, 381, 385, 392, 399, 408, 417 }
+#elif CONFIG_BATTERY == BATT_LIPOL340
+    /* measured values */
+    { 323, 362, 370, 373, 375, 378, 383, 389, 395, 403, 416 }
 #else /* NiMH */
     /* original values were taken directly after charging, but it should show
        100% after turning off the device for some hours, too */
Index: firmware/export/config-ipodnano.h
===================================================================
RCS file: /cvsroot/rockbox/firmware/export/config-ipodnano.h,v
retrieving revision 1.16
diff -u -r1.16 config-ipodnano.h
--- firmware/export/config-ipodnano.h	19 Mar 2006 17:42:58 -0000	1.16
+++ firmware/export/config-ipodnano.h	2 Apr 2006 16:19:30 -0000
@@ -62,9 +62,10 @@
 #define CONFIG_I2C I2C_PP5020
 
 /* Type of mobile power */
-//#define CONFIG_BATTERY BATT_LIPOL1300
+#define CONFIG_BATTERY BATT_LIPOL340
 
-#define BATTERY_SCALE_FACTOR 16665 /* FIX: this value is picked at random */
+/* value calculated using multimeter and may not be correct */
+#define BATTERY_SCALE_FACTOR 5840
 
 /* Define this if the platform can charge batteries */
 //#define HAVE_CHARGING 1
Index: firmware/export/config.h
===================================================================
RCS file: /cvsroot/rockbox/firmware/export/config.h,v
retrieving revision 1.65
diff -u -r1.65 config.h
--- firmware/export/config.h	30 Mar 2006 19:18:45 -0000	1.65
+++ firmware/export/config.h	2 Apr 2006 16:19:30 -0000
@@ -67,6 +67,7 @@
 #define BATT_4AA_NIMH   1500
 #define BATT_3AAA       1000 /* Ondio */
 #define BATT_LIPOL1300  1300 /* the type used in iRiver h1x0 models */
+#define BATT_LIPOL340   340  /* ipod nano */
 
 /* CONFIG_LCD */
 #define LCD_GMINI100  0
Index: firmware/export/powermgmt.h
===================================================================
RCS file: /cvsroot/rockbox/firmware/export/powermgmt.h,v
retrieving revision 1.29
diff -u -r1.29 powermgmt.h
--- firmware/export/powermgmt.h	4 Mar 2006 09:48:53 -0000	1.29
+++ firmware/export/powermgmt.h	2 Apr 2006 16:19:30 -0000
@@ -31,6 +31,10 @@
 #define BATTERY_CAPACITY_MIN 1300
 #define BATTERY_CAPACITY_MAX 3200 /* max. capacity selectable in settings */
 #define BATTERY_TYPES_COUNT      1
+#elif CONFIG_BATTERY == BATT_LIPOL340 /* ipod nano */
+#define BATTERY_CAPACITY_MIN 340
+#define BATTERY_CAPACITY_MAX 1000
+#define BATTERY_TYPES_COUNT      1
 #else /* Recorder, NiMH */
 #define BATTERY_CAPACITY_MIN 1500
 #define BATTERY_CAPACITY_MAX 3200 /* max. capacity selectable in settings */
