forked from len0rd/rockbox
FS#6860 - Battery calibration for Sansa. Thanks to Matthias Wientapper.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12898 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7a780dbefc
commit
74b9ec0bbe
3 changed files with 12 additions and 1 deletions
|
@ -83,7 +83,7 @@
|
||||||
#define CONFIG_I2C I2C_PP5020
|
#define CONFIG_I2C I2C_PP5020
|
||||||
|
|
||||||
/* Type of mobile power */
|
/* Type of mobile power */
|
||||||
#define CONFIG_BATTERY BATT_LPCS355385
|
#define CONFIG_BATTERY BATT_LIION750
|
||||||
#define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */
|
#define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */
|
||||||
#define BATTERY_CAPACITY_MAX 750 /* max. capacity selectable */
|
#define BATTERY_CAPACITY_MAX 750 /* max. capacity selectable */
|
||||||
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
|
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
|
||||||
|
|
|
@ -77,6 +77,7 @@
|
||||||
#define BATT_LPCS355385 1550 /* iriver h10 20Gb - SKC LPCS355385 */
|
#define BATT_LPCS355385 1550 /* iriver h10 20Gb - SKC LPCS355385 */
|
||||||
#define BATT_BP009 820 /* iriver H10 5/6Gb - iriver BP009 */
|
#define BATT_BP009 820 /* iriver H10 5/6Gb - iriver BP009 */
|
||||||
#define BATT_LIION830 830 /* Toshiba Gigabeat Fxx and Xxx series MK11-2740 */
|
#define BATT_LIION830 830 /* Toshiba Gigabeat Fxx and Xxx series MK11-2740 */
|
||||||
|
#define BATT_LIION750 750 /* Sansa e200 LiIon 3,7V */
|
||||||
#define BATT_1AA 333 /* iRiver iFP: Alkaline, NiHM */
|
#define BATT_1AA 333 /* iRiver iFP: Alkaline, NiHM */
|
||||||
|
|
||||||
/* CONFIG_CHARGING */
|
/* CONFIG_CHARGING */
|
||||||
|
|
|
@ -190,6 +190,8 @@ static const unsigned int battery_level_dangerous[BATTERY_TYPES_COUNT] =
|
||||||
105, 115
|
105, 115
|
||||||
#elif CONFIG_BATTERY == BATT_LIPOL1300 /* iRiver H1x0: LiPolymer */
|
#elif CONFIG_BATTERY == BATT_LIPOL1300 /* iRiver H1x0: LiPolymer */
|
||||||
338
|
338
|
||||||
|
#elif CONFIG_BATTERY == BATT_LIION750 /* Sansa e200 */
|
||||||
|
340
|
||||||
#elif CONFIG_BATTERY == BATT_LIION830 /* Gigabeat F */
|
#elif CONFIG_BATTERY == BATT_LIION830 /* Gigabeat F */
|
||||||
345
|
345
|
||||||
#elif CONFIG_BATTERY == BATT_IAUDIO_X5M5 /* iAudio X5 */
|
#elif CONFIG_BATTERY == BATT_IAUDIO_X5M5 /* iAudio X5 */
|
||||||
|
@ -211,6 +213,8 @@ static const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
|
||||||
270, 280
|
270, 280
|
||||||
#elif CONFIG_BATTERY == BATT_LIPOL1300 /* iRiver Hxxx */
|
#elif CONFIG_BATTERY == BATT_LIPOL1300 /* iRiver Hxxx */
|
||||||
302
|
302
|
||||||
|
#elif CONFIG_BATTERY == BATT_LIION750 /* Sansa e200 */
|
||||||
|
330
|
||||||
#elif CONFIG_BATTERY == BATT_LIION830 /* Gigabeat F */
|
#elif CONFIG_BATTERY == BATT_LIION830 /* Gigabeat F */
|
||||||
340
|
340
|
||||||
#elif CONFIG_BATTERY == BATT_IAUDIO_X5M5 /* iAudio X5 */
|
#elif CONFIG_BATTERY == BATT_IAUDIO_X5M5 /* iAudio X5 */
|
||||||
|
@ -258,6 +262,9 @@ static const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
|
||||||
#elif CONFIG_BATTERY == BATT_LIION830
|
#elif CONFIG_BATTERY == BATT_LIION830
|
||||||
/* Toshiba Gigabeat Li Ion 830mAH figured from discharge curve */
|
/* Toshiba Gigabeat Li Ion 830mAH figured from discharge curve */
|
||||||
{ 354, 357, 359, 361, 364, 366, 372, 381, 377, 381, 394 },
|
{ 354, 357, 359, 361, 364, 366, 372, 381, 377, 381, 394 },
|
||||||
|
#elif CONFIG_BATTERY == BATT_LIION750
|
||||||
|
/* Sansa Li Ion 750mAH FIXME this is a first linear approach */
|
||||||
|
{ 330, 339, 348, 357, 366, 375, 384, 393, 402, 411, 420 },
|
||||||
#else /* NiMH */
|
#else /* NiMH */
|
||||||
/* original values were taken directly after charging, but it should show
|
/* original values were taken directly after charging, but it should show
|
||||||
100% after turning off the device for some hours, too */
|
100% after turning off the device for some hours, too */
|
||||||
|
@ -276,6 +283,9 @@ static const unsigned short percent_to_volt_charge[11] =
|
||||||
#if CONFIG_BATTERY == BATT_LIPOL1300
|
#if CONFIG_BATTERY == BATT_LIPOL1300
|
||||||
/* values measured over one full charging cycle */
|
/* values measured over one full charging cycle */
|
||||||
354, 386, 393, 398, 400, 402, 404, 408, 413, 418, 423 /* LiPo */
|
354, 386, 393, 398, 400, 402, 404, 408, 413, 418, 423 /* LiPo */
|
||||||
|
#elif CONFIG_BATTERY == BATT_LIION750
|
||||||
|
/* Sansa Li Ion 750mAH FIXME*/
|
||||||
|
330, 339, 348, 357, 366, 375, 384, 393, 402, 411, 420
|
||||||
#elif CONFIG_BATTERY == BATT_LIION830
|
#elif CONFIG_BATTERY == BATT_LIION830
|
||||||
/* Toshiba Gigabeat Li Ion 830mAH */
|
/* Toshiba Gigabeat Li Ion 830mAH */
|
||||||
354, 357, 359, 361, 364, 366, 372, 381, 377, 381, 394
|
354, 357, 359, 361, 364, 366, 372, 381, 377, 381, 394
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue