mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
FS#13538 export and import battery level tables
when battery_bench is run exports a file in the rockbox directory called 'battery_levels.default' if the user wants their own levels they can rename the file battery_levels.cfg and it will be loaded at boot some minimal error checking is performed prior to using the values added manual entry Change-Id: Ia0126faced0c7229fcf8385a1bcb584b5a9dc378
This commit is contained in:
parent
3539dd5a70
commit
10f8312db4
79 changed files with 611 additions and 298 deletions
|
|
@ -199,20 +199,20 @@ void KEY_INT_IRQ(void)
|
|||
|
||||
*/
|
||||
|
||||
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
|
||||
unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] =
|
||||
{
|
||||
/* 5% */
|
||||
3414, 3634
|
||||
};
|
||||
|
||||
const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
|
||||
unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
|
||||
{
|
||||
/* 0% */
|
||||
3307, 3307
|
||||
};
|
||||
|
||||
/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
|
||||
const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
|
||||
unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
|
||||
{
|
||||
{ 3307, 3459, 3530, 3575, 3608, 3648, 3723, 3819, 3918, 4022, 4162 },
|
||||
{ 3300, 3652, 3704, 3730, 3753, 3786, 3836, 3906, 3973, 4061, 4160 }
|
||||
|
|
@ -220,7 +220,7 @@ const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
|
|||
|
||||
#if CONFIG_CHARGING
|
||||
/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
|
||||
const unsigned short percent_to_volt_charge[11] =
|
||||
unsigned short percent_to_volt_charge[11] =
|
||||
// { 3300, 3652, 3704, 3730, 3753, 3786, 3836, 3906, 3973, 4061, 4160 };
|
||||
{ 3444, 3827, 3893, 3909, 3931, 4001, 4067, 4150, 4206, 4207, 4208 };
|
||||
#endif /* CONFIG_CHARGING */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue