summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm
diff options
context:
space:
mode:
authorRob Purchase <shotofadds@rockbox.org>2009-07-10 19:09:38 +0000
committerRob Purchase <shotofadds@rockbox.org>2009-07-10 19:09:38 +0000
commitd633a9fbeed791c9e8a2656d12da8a8e11f8f30c (patch)
tree7690a5b5c67008156cfdf2e4057d16a03cd407c6 /firmware/target/arm
parent755de6a3de69968fa52dc08855edc7b542979d90 (diff)
downloadrockbox-d633a9fbeed791c9e8a2656d12da8a8e11f8f30c.tar.gz
rockbox-d633a9fbeed791c9e8a2656d12da8a8e11f8f30c.tar.bz2
rockbox-d633a9fbeed791c9e8a2656d12da8a8e11f8f30c.zip
D2: Update the battery discharge curve to observed values, and add a crude runtime estimation (this is based on playback from SD card, other usage will vary).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21754 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/tcc780x/cowond2/powermgmt-cowond2.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/firmware/target/arm/tcc780x/cowond2/powermgmt-cowond2.c b/firmware/target/arm/tcc780x/cowond2/powermgmt-cowond2.c
index 751e45eb6a..683c1c3be7 100644
--- a/firmware/target/arm/tcc780x/cowond2/powermgmt-cowond2.c
+++ b/firmware/target/arm/tcc780x/cowond2/powermgmt-cowond2.c
@@ -26,32 +26,32 @@
#include "pcf50606.h"
unsigned short current_voltage = 3910;
-
+
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
{
- /* FIXME: calibrate value */
3380
};
const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
{
- /* FIXME: calibrate value */
3300
};
/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
{
- /* FIXME: calibrate values. Table is "inherited" from iPod-PCF / H100 */
- { 3370, 3650, 3700, 3740, 3780, 3820, 3870, 3930, 4000, 4080, 4160 }
+ /* Standard D2 internal battery */
+ { 3370, 3690, 3750, 3775, 3790, 3820, 3880, 3940, 3980, 4090, 4170 }
+
+ /* TODO: DIY replacements eg. Nokia BP-4L ? */
};
#if CONFIG_CHARGING
/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
const unsigned short percent_to_volt_charge[11] =
{
- /* FIXME: calibrate values. Table is "inherited" from iPod-PCF / H100 */
- 3370, 3650, 3700, 3740, 3780, 3820, 3870, 3930, 4000, 4080, 4160
+ /* FIXME: voltages seem to be offset during charging (eg. 4500+) */
+ 3370, 3690, 3750, 3775, 3790, 3820, 3880, 3940, 3980, 4090, 4170
};
#endif /* CONFIG_CHARGING */