diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2010-04-09 10:31:40 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2010-04-09 10:31:40 +0000 |
commit | 7686c8fa99d7aa82b00b30ce37fc161c412b94a6 (patch) | |
tree | 6ece22e7283cba0b10159731484f2b65907c3b37 /firmware/target/arm/imx31/gigabeat-s/powermgmt-gigabeat-s.c | |
parent | 0b476f75f1eda25a7a3a7abdeaab8155cc3138c2 (diff) | |
download | rockbox-7686c8fa99d7aa82b00b30ce37fc161c412b94a6.tar.gz rockbox-7686c8fa99d7aa82b00b30ce37fc161c412b94a6.zip |
Gigabeat S: More accurate battery level estimation for discharge curve.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25551 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/powermgmt-gigabeat-s.c')
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/powermgmt-gigabeat-s.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/powermgmt-gigabeat-s.c b/firmware/target/arm/imx31/gigabeat-s/powermgmt-gigabeat-s.c index 34abf04940..2ce3eb4552 100644 --- a/firmware/target/arm/imx31/gigabeat-s/powermgmt-gigabeat-s.c +++ b/firmware/target/arm/imx31/gigabeat-s/powermgmt-gigabeat-s.c | |||
@@ -28,29 +28,29 @@ | |||
28 | #include "power.h" | 28 | #include "power.h" |
29 | #include "power-gigabeat-s.h" | 29 | #include "power-gigabeat-s.h" |
30 | 30 | ||
31 | /* TODO: Battery tests to get the right values! */ | ||
32 | const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = | 31 | const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = |
33 | { | 32 | { |
34 | 3450 | 33 | 3659 |
35 | }; | 34 | }; |
36 | 35 | ||
37 | const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = | 36 | const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = |
38 | { | 37 | { |
39 | 3400 | 38 | 3650 |
40 | }; | 39 | }; |
41 | 40 | ||
42 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ | 41 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ |
43 | const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = | 42 | const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = |
44 | { | 43 | { |
45 | /* Toshiba Gigabeat Li Ion 830mAH figured from discharge curve */ | 44 | /* Toshiba Gigabeat S Li Ion 700mAH figured from discharge curve */ |
46 | { 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 }, | 45 | { 3659, 3719, 3745, 3761, 3785, 3813, 3856, 3926, 3984, 4040, 4121 }, |
47 | }; | 46 | }; |
48 | 47 | ||
49 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ | 48 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ |
50 | const unsigned short percent_to_volt_charge[11] = | 49 | const unsigned short percent_to_volt_charge[11] = |
51 | { | 50 | { |
52 | /* Toshiba Gigabeat Li Ion 830mAH */ | 51 | /* Toshiba Gigabeat S Li Ion 700mAH figured from charge curve */ |
53 | 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 | 52 | /* TODO - get actual charge curve (this is copy of discharge) */ |
53 | 3659, 3719, 3745, 3761, 3785, 3813, 3856, 3926, 3984, 4040, 4121 | ||
54 | }; | 54 | }; |
55 | 55 | ||
56 | /* Returns battery voltage from ADC [millivolts] */ | 56 | /* Returns battery voltage from ADC [millivolts] */ |