diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-10-14 08:37:00 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-10-14 08:37:00 -0400 |
commit | 1b449abf39feeace10b6db604a4537718769141e (patch) | |
tree | c8d65c26e423128d1e8159fd1e411d8907f6196f /firmware | |
parent | 19d45c9257d1d8d1f59746455cddaeef910b1577 (diff) | |
download | rockbox-1b449abf39feeace10b6db604a4537718769141e.tar.gz rockbox-1b449abf39feeace10b6db604a4537718769141e.zip |
erosq: Add battery discharge curve and initial runtime estimation.
(playing mp3 with headphones inserted lasted just over 13 hours)
Change-Id: Id610f911811eafd914db20000ae860c75e0d8a93
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/export/config/aigoerosq.h | 10 | ||||
-rw-r--r-- | firmware/target/hosted/aigo/powermgmt-erosq.c | 5 |
2 files changed, 10 insertions, 5 deletions
diff --git a/firmware/export/config/aigoerosq.h b/firmware/export/config/aigoerosq.h index 6129557726..5a520707d9 100644 --- a/firmware/export/config/aigoerosq.h +++ b/firmware/export/config/aigoerosq.h | |||
@@ -122,11 +122,15 @@ | |||
122 | #define HW_SAMPR_CAPS SAMPR_CAP_ALL_192 | 122 | #define HW_SAMPR_CAPS SAMPR_CAP_ALL_192 |
123 | 123 | ||
124 | /* Battery */ | 124 | /* Battery */ |
125 | #define BATTERY_CAPACITY_DEFAULT 2000 /* default battery capacity */ | 125 | #define BATTERY_CAPACITY_DEFAULT 1300 /* default battery capacity */ |
126 | #define BATTERY_CAPACITY_MIN 2000 /* min. capacity selectable */ | 126 | #define BATTERY_CAPACITY_MIN 1300 /* min. capacity selectable */ |
127 | #define BATTERY_CAPACITY_MAX 2000 /* max. capacity selectable */ | 127 | #define BATTERY_CAPACITY_MAX 1500 /* max. capacity selectable */ |
128 | #define BATTERY_CAPACITY_INC 0 /* capacity increment */ | 128 | #define BATTERY_CAPACITY_INC 0 /* capacity increment */ |
129 | 129 | ||
130 | #define CURRENT_NORMAL 100 // 1.7mA * 60s | ||
131 | #define CURRENT_BACKLIGHT 180 | ||
132 | #define CURRENT_MAX_CHG 500 // bursts higher if needed | ||
133 | |||
130 | /* ROLO */ | 134 | /* ROLO */ |
131 | #define BOOTFILE_EXT "erosq" | 135 | #define BOOTFILE_EXT "erosq" |
132 | #define BOOTFILE "rockbox." BOOTFILE_EXT | 136 | #define BOOTFILE "rockbox." BOOTFILE_EXT |
diff --git a/firmware/target/hosted/aigo/powermgmt-erosq.c b/firmware/target/hosted/aigo/powermgmt-erosq.c index 14286de3fd..e02dbc6244 100644 --- a/firmware/target/hosted/aigo/powermgmt-erosq.c +++ b/firmware/target/hosted/aigo/powermgmt-erosq.c | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = | 24 | const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = |
25 | { | 25 | { |
26 | 3470 | 26 | 3435 |
27 | }; | 27 | }; |
28 | 28 | ||
29 | /* the OF shuts down at this voltage */ | 29 | /* the OF shuts down at this voltage */ |
@@ -35,7 +35,8 @@ const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = | |||
35 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ | 35 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ |
36 | const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = | 36 | const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = |
37 | { | 37 | { |
38 | { 3400, 3639, 3697, 3723, 3757, 3786, 3836, 3906, 3980, 4050, 4159 } | 38 | /* ErosQ's 1300mAh battery */ |
39 | { 3400, 3478, 3547, 3581, 3618, 3654, 3725, 3820, 3909, 3999, 4159 } | ||
39 | }; | 40 | }; |
40 | 41 | ||
41 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ | 42 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ |