From 8839f18cc8234857e1ec3e77cdfa1f8daec311d9 Mon Sep 17 00:00:00 2001 From: Michael Giacomelli Date: Mon, 29 Jun 2009 18:32:43 +0000 Subject: Move Archos battery runtime estimation defines into config files instead of powermgmt.h. Replace old default values (which were actually the Archos Player currents) with a new default (1mA). This should give nonsense runtime estimates (instead of semi-reasonable but completely wrong estimates) on all players that do not have a battery current defined. Hopefully this will remind people that they should define the battery current when they start a new port. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21565 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/config-fmrecorder.h | 4 ++++ firmware/export/config-player.h | 3 +++ firmware/export/config-recorder.h | 4 ++++ firmware/export/config-recorderv2.h | 4 ++++ firmware/export/powermgmt.h | 16 +++++++++------- 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h index bc859df67a..acc1c74dcf 100644 --- a/firmware/export/config-fmrecorder.h +++ b/firmware/export/config-fmrecorder.h @@ -88,6 +88,10 @@ #define BATTERY_CAPACITY_INC 50 /* capacity increment */ #define BATTERY_TYPES_COUNT 1 /* only one type */ +#define CURRENT_NORMAL 145 /* usual current in mA */ +#define CURRENT_RECORD 35 /* additional recording current */ +#define CURRENT_USB 500 /* usual current in mA in USB mode */ + /* Hardware controlled charging with monitoring */ #define CONFIG_CHARGING CHARGING_MONITOR diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h index 9d4696797b..5f6cf17fbe 100644 --- a/firmware/export/config-player.h +++ b/firmware/export/config-player.h @@ -49,6 +49,9 @@ #define BATTERY_CAPACITY_INC 50 /* capacity increment */ #define BATTERY_TYPES_COUNT 1 /* only one type */ +#define CURRENT_NORMAL 145 /* usual current in mA */ +#define CURRENT_USB 500 /* usual current in mA in USB mode */ + /* define this if the unit should not shut down on low battery. */ #define NO_LOW_BATTERY_SHUTDOWN diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h index 44006b4196..37c2222985 100644 --- a/firmware/export/config-recorder.h +++ b/firmware/export/config-recorder.h @@ -77,6 +77,10 @@ #define BATTERY_CAPACITY_INC 50 /* capacity increment */ #define BATTERY_TYPES_COUNT 1 /* only one type */ +#define CURRENT_NORMAL 145 /* usual current in mA */ +#define CURRENT_RECORD 35 /* additional recording current */ +#define CURRENT_USB 500 /* usual current in mA in USB mode */ + /* define this if the unit should not shut down on low battery. */ #define NO_LOW_BATTERY_SHUTDOWN diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h index 8c2bc6863f..5ca9459750 100644 --- a/firmware/export/config-recorderv2.h +++ b/firmware/export/config-recorderv2.h @@ -83,6 +83,10 @@ #define BATTERY_CAPACITY_INC 50 /* capacity increment */ #define BATTERY_TYPES_COUNT 1 /* only one type */ +#define CURRENT_NORMAL 145 /* usual current in mA */ +#define CURRENT_RECORD 35 /* additional recording current */ +#define CURRENT_USB 500 /* usual current in mA in USB mode */ + /* Hardware controlled charging with monitoring */ #define CONFIG_CHARGING CHARGING_MONITOR diff --git a/firmware/export/powermgmt.h b/firmware/export/powermgmt.h index 39e2e6eab9..e691e1b10b 100644 --- a/firmware/export/powermgmt.h +++ b/firmware/export/powermgmt.h @@ -76,28 +76,30 @@ extern unsigned int power_thread_inputs; #ifndef SIMULATOR -/* Generic current values that are really rather meaningless - config header - * should define proper numbers. */ +/* Generic current values that are intentionally meaningless - config header + * should define proper numbers. Use insane values here to remind people + * to define the correct values in the proper header*/ + #ifndef CURRENT_NORMAL -#define CURRENT_NORMAL 145 /* usual current in mA */ +#define CURRENT_NORMAL 1 /* usual current in mA */ #endif #ifndef CURRENT_BACKLIGHT -#define CURRENT_BACKLIGHT 30 /* additional current when backlight always on */ +#define CURRENT_BACKLIGHT 1 /* additional current when backlight always on */ #endif #ifdef HAVE_RECORDING #ifndef CURRENT_RECORD -#define CURRENT_RECORD 35 /* additional recording current */ +#define CURRENT_RECORD 1 /* additional recording current */ #endif #endif /* HAVE_RECORDING */ #ifndef CURRENT_USB -#define CURRENT_USB 500 /* usual current in mA in USB mode */ +#define CURRENT_USB 1 /* usual current in mA in USB mode */ #endif #ifdef HAVE_REMOTE_LCD -#define CURRENT_REMOTE 8 /* additional current when remote connected */ +#define CURRENT_REMOTE 1 /* additional current when remote connected */ #endif /* HAVE_REMOTE_LCD */ #if CONFIG_CHARGING -- cgit v1.2.3