mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -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
|
|
@ -22,20 +22,20 @@
|
|||
#include "config.h"
|
||||
|
||||
/* The battery manufacturer's website shows discharge curves down to 3.0V,
|
||||
so 'dangerous' and 'shutoff' levels of 3.4V and 3.3V should be safe.
|
||||
so 'disksafe' and 'shutoff' levels of 3.4V and 3.3V should be safe.
|
||||
*/
|
||||
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
|
||||
unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] =
|
||||
{
|
||||
3400
|
||||
};
|
||||
|
||||
const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
|
||||
unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
|
||||
{
|
||||
3300
|
||||
};
|
||||
|
||||
/* 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] =
|
||||
{
|
||||
{ 3300, 3676, 3715, 3749, 3783, 3812, 3850, 3918, 3982, 4065, 4148 }
|
||||
|
||||
|
|
@ -43,7 +43,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] =
|
||||
{
|
||||
3364, 3816, 3879, 3903, 3934, 3983, 4051, 4119, 4188, 4188, 4188
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue