erosq: Add battery discharge curve and initial runtime estimation.

(playing mp3 with headphones inserted lasted just over 13 hours)

Change-Id: Id610f911811eafd914db20000ae860c75e0d8a93
This commit is contained in:
Solomon Peachy 2020-10-14 08:37:00 -04:00
parent 19d45c9257
commit 1b449abf39
2 changed files with 10 additions and 5 deletions

View file

@ -122,11 +122,15 @@
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_192
/* Battery */
#define BATTERY_CAPACITY_DEFAULT 2000 /* default battery capacity */
#define BATTERY_CAPACITY_MIN 2000 /* min. capacity selectable */
#define BATTERY_CAPACITY_MAX 2000 /* max. capacity selectable */
#define BATTERY_CAPACITY_DEFAULT 1300 /* default battery capacity */
#define BATTERY_CAPACITY_MIN 1300 /* min. capacity selectable */
#define BATTERY_CAPACITY_MAX 1500 /* max. capacity selectable */
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define CURRENT_NORMAL 100 // 1.7mA * 60s
#define CURRENT_BACKLIGHT 180
#define CURRENT_MAX_CHG 500 // bursts higher if needed
/* ROLO */
#define BOOTFILE_EXT "erosq"
#define BOOTFILE "rockbox." BOOTFILE_EXT

View file

@ -23,7 +23,7 @@
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
{
3470
3435
};
/* the OF shuts down at this voltage */
@ -35,7 +35,8 @@ const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
{
{ 3400, 3639, 3697, 3723, 3757, 3786, 3836, 3906, 3980, 4050, 4159 }
/* ErosQ's 1300mAh battery */
{ 3400, 3478, 3547, 3581, 3618, 3654, 3725, 3820, 3909, 3999, 4159 }
};
/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */