1
0
Fork 0
forked from len0rd/rockbox

battery capacity (1500-2400 in 50mAh steps) saved to disk

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3008 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Uwe Freese 2002-12-16 22:58:48 +00:00
parent ae1ba1d5de
commit 0bf70e65e8
5 changed files with 20 additions and 29 deletions

View file

@ -428,27 +428,16 @@ static bool bidir_limit(void)
}
#endif
#ifndef SIMULATOR
/**
* Menu to set the battery capacity
*/
static bool battery_capacity(void) {
bool retval = false;
char* names[] = { "1500 mAh ", "1600 mAh ",
"1700 mAh ", "1800 mAh ",
"1900 mAh ", "2000 mAh ",
"2100 mAh ", "2200 mAh "
};
retval = set_option( str(LANG_BATTERY_CAPACITY),
&global_settings.battery_capacity, names, 8, NULL);
#ifndef SIMULATOR
set_battery_capacity(global_settings.battery_capacity);
#endif /* SIMULATOR */
return retval;
static bool battery_capacity(void)
{
return set_int(str(LANG_BATTERY_CAPACITY), " mAh", &global_settings.battery_capacity,
&set_battery_capacity, 50, 1500, BATTERY_CAPACITY_MAX );
}
#endif
#ifdef HAVE_CHARGE_CTRL
static bool deep_discharge(void)
@ -742,7 +731,9 @@ static bool system_settings_menu(void)
#ifdef HAVE_ATA_POWER_OFF
{ str(LANG_POWEROFF), poweroff },
#endif
#ifndef SIMULATOR
{ str(LANG_BATTERY_CAPACITY), battery_capacity },
#endif
#ifdef HAVE_CHARGE_CTRL
{ str(LANG_DISCHARGE), deep_discharge },
{ str(LANG_TRICKLE_CHARGE), trickle_charge },