HD200 - calibrate battery indicator based on measurements and battery_benches

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27350 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Marcin Bukat 2010-07-08 16:53:09 +00:00
parent 771dc22aa1
commit d367ab41e3
2 changed files with 14 additions and 18 deletions

View file

@ -69,9 +69,6 @@
#define CONFIG_KEYPAD MPIO_HD200_PAD
#define AB_REPEAT_ENABLE 1
#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE
/* Define this if you do software codec */
#define CONFIG_CODEC SWCODEC
@ -118,19 +115,19 @@
#define CODEC_SRCTRL_44100HZ (0x10 << 1)
#define CODEC_SRCTRL_88200HZ (0x1E << 1)
#define BATTERY_CAPACITY_DEFAULT 950 /* default battery capacity */
#define BATTERY_CAPACITY_MIN 950 /* min. capacity selectable */
#define BATTERY_CAPACITY_MAX 2250 /* max. capacity selectable */
#define BATTERY_TYPES_COUNT 1
#define BATTERY_CAPACITY_DEFAULT 850 /* this is wild guess */
#define BATTERY_CAPACITY_MIN 800 /* min. capacity selectable */
#define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
#define CURRENT_NORMAL 68 /* measured during playback unboosted */
#define CURRENT_BACKLIGHT 24 /* measured */
#define CURRENT_RECORD 40 /* additional current while recording */
#define CURRENT_REMOTE 0 /* additional current when remote connected */
#define CONFIG_CHARGING CHARGING_MONITOR
/* define current usage levels */
/* additional current when remote connected */
/*
#define CURRENT_REMOTE 8
*/
#ifndef SIMULATOR
/* Define this if your LCD can set contrast */

View file

@ -25,26 +25,25 @@
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
{
3700
3600
};
const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
{
3650
3500
};
/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
{
/* from OF and measurements voltage range is 3.7-4.1 V */
{ 3700, 3740, 3780, 3820, 3860, 3900, 3940, 3980, 4020, 4060, 4100 }
{ 3500, 3566, 3597, 3619, 3644, 3676, 3732, 3806, 3868, 3937, 4004 }
};
/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
const unsigned short percent_to_volt_charge[11] =
{
/* values measured over one full charging cycle */
3540, 3860, 3930, 3980, 4000, 4020, 4040, 4080, 4130, 4180, 4230 /* LiPo */
3386, 3872, 3904, 3942, 3996, 4029, 4033, 4036, 4038, 4039, 4041
};
/* 3.33V as reference */