Index: firmware/export/config-ipodnano.h =================================================================== --- firmware/export/config-ipodnano.h (revision 13467) +++ firmware/export/config-ipodnano.h (working copy) @@ -70,7 +70,7 @@ /* We can fade the backlight by using PWM */ #define HAVE_BACKLIGHT_PWM_FADING -#define BATTERY_CAPACITY_DEFAULT 1300 /* default battery capacity */ +#define BATTERY_CAPACITY_DEFAULT 300 /* default battery capacity */ #ifndef SIMULATOR @@ -84,10 +84,10 @@ /* Type of mobile power */ #define CONFIG_BATTERY BATT_LIPOL1300 -#define BATTERY_CAPACITY_MIN 1300 /* min. capacity selectable */ -#define BATTERY_CAPACITY_MAX 3200 /* max. capacity selectable */ -#define BATTERY_CAPACITY_INC 50 /* capacity increment */ -#define BATTERY_TYPES_COUNT 1 /* only one type */ +#define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ +#define BATTERY_CAPACITY_MAX 800 /* max. capacity selectable */ +#define BATTERY_CAPACITY_INC 50 /* capacity increment */ +#define BATTERY_TYPES_COUNT 1 /* only one type */ #define BATTERY_SCALE_FACTOR 5865 /* Hardware controlled charging? FIXME */ Index: firmware/export/config-ipodvideo.h =================================================================== --- firmware/export/config-ipodvideo.h (revision 13467) +++ firmware/export/config-ipodvideo.h (working copy) @@ -8,6 +8,9 @@ /* For Rolo and boot loader */ #define MODEL_NUMBER 5 +/* For battery type (30GB by default, undefine here to use 60/80GB model) */ +#define CONFIG_BATTERY_IPOD_VIDEO_30GB + /* define this if you have recording possibility */ #define HAVE_RECORDING @@ -70,7 +73,12 @@ /* We can fade the backlight by using PWM */ #define HAVE_BACKLIGHT_PWM_FADING +/* We differ between 30GB and 60/80GB models */ +#if defined(CONFIG_BATTERY_IPOD_VIDEO_30GB) #define BATTERY_CAPACITY_DEFAULT 400 /* default battery capacity for the 30GB model */ +#else +#define BATTERY_CAPACITY_DEFAULT 600 /* default battery capacity for the 60/80GB model */ +#endif #ifndef SIMULATOR @@ -83,12 +91,21 @@ #define CONFIG_I2C I2C_PP5020 /* Type of mobile power */ +#if defined(CONFIG_BATTERY_IPOD_VIDEO_30GB) #define CONFIG_BATTERY BATT_LIPOL1300 -#define BATTERY_CAPACITY_MIN 400 /* min. capacity selectable */ +#define BATTERY_CAPACITY_MIN 400 /* min. capacity selectable */ #define BATTERY_CAPACITY_MAX 1000 /* max. capacity selectable */ #define BATTERY_CAPACITY_INC 50 /* capacity increment */ #define BATTERY_TYPES_COUNT 1 /* only one type */ #define BATTERY_SCALE_FACTOR 5865 +#else +#define CONFIG_BATTERY BATT_LIPOL1300 +#define BATTERY_CAPACITY_MIN 600 /* min. capacity selectable */ +#define BATTERY_CAPACITY_MAX 1200 /* max. capacity selectable */ +#define BATTERY_CAPACITY_INC 50 /* capacity increment */ +#define BATTERY_TYPES_COUNT 1 /* only one type */ +#define BATTERY_SCALE_FACTOR 5865 +#endif /* Hardware controlled charging with monitoring */ #define CONFIG_CHARGING CHARGING_MONITOR Index: firmware/export/powermgmt.h =================================================================== --- firmware/export/powermgmt.h (revision 13467) +++ firmware/export/powermgmt.h (working copy) @@ -103,7 +103,19 @@ # define CURRENT_NORMAL 80 /* 16h playback on 1300mAh battery from IriverRuntime wiki page */ # define CURRENT_BACKLIGHT 23 /* FIXME: This needs to be measured, copied from H100 */ # define CURRENT_RECORD 110 /* additional current while recording */ -#else /* Not iriver H1x0, H3x0, nor Archos Ondio */ +#elif defined(IPOD_ARCH) && (MODEL_NUMBER==4) /* iPOD Nano */ +# define CURRENT_NORMAL 35 /* 8.5-9.0h playback out of 300mAh battery from IpodRuntime */ +# define CURRENT_BACKLIGHT 20 /* FIXME: estimation took over from iPOD Video */ +#if defined(HAVE_RECORDING) +# define CURRENT_RECORD 35 /* FIXME: this needs adjusting */ +#endif +#elif defined(IPOD_ARCH) && (MODEL_NUMBER==5) /* iPOD Video */ +# define CURRENT_NORMAL 53 /* 7-8h out of 400mAh battery (30GB) or 11h out of 600mAh (60GB) from IpodRuntime */ +# define CURRENT_BACKLIGHT 20 /* estimation calculated from IpodRuntime measurement */ +#if defined(HAVE_RECORDING) +# define CURRENT_RECORD 35 /* FIXME: this needs adjusting */ +#endif +#else /* Not iriver H1x0, H3x0, nor Archos Ondio, nor iPODVideo */ # define CURRENT_NORMAL 145 /* usual current in mA when using the AJB including some disk/backlight/... activity */ # define CURRENT_BACKLIGHT 30 /* additional current when backlight always on */ #if defined(HAVE_RECORDING)