mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -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
|
|
@ -32,26 +32,26 @@
|
|||
Charge curve have not been calibrated yet.
|
||||
*/
|
||||
|
||||
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
|
||||
unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] =
|
||||
{
|
||||
/* TODO: this is just an initial guess */
|
||||
3350,
|
||||
};
|
||||
|
||||
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] =
|
||||
{
|
||||
/* FIXME: Uncalibrated curve */
|
||||
{ 3300, 3350, 3433, 3516, 3600, 3683, 3767, 3850, 3933, 4017, 4100 }
|
||||
};
|
||||
|
||||
/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
|
||||
const unsigned short percent_to_volt_charge[11] =
|
||||
unsigned short percent_to_volt_charge[11] =
|
||||
/* TODO: simple copy of discharge curve */
|
||||
{ 3300, 3350, 3433, 3516, 3600, 3683, 3767, 3850, 3933, 4017, 4100 };
|
||||
|
||||
|
|
|
|||
|
|
@ -32,26 +32,26 @@
|
|||
Charge curve have not been calibrated yet.
|
||||
*/
|
||||
|
||||
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
|
||||
unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] =
|
||||
{
|
||||
/* TODO: this is just an initial guess */
|
||||
7050,
|
||||
};
|
||||
|
||||
const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
|
||||
unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
|
||||
{
|
||||
7000,
|
||||
};
|
||||
|
||||
/* 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] =
|
||||
{
|
||||
/* FIXME: Uncalibrated curve */
|
||||
{ 7000, 7050, 7100, 7150, 7200, 7250, 7300, 7350, 7400, 7450, 7500 }
|
||||
};
|
||||
|
||||
/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
|
||||
const unsigned short percent_to_volt_charge[11] =
|
||||
unsigned short percent_to_volt_charge[11] =
|
||||
/* TODO: simple copy of discharge curve */
|
||||
{ 7000, 7050, 7100, 7150, 7200, 7250, 7300, 7350, 7400, 7450, 7500 };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue