summaryrefslogtreecommitdiff
path: root/apps/settings_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings_menu.c')
-rw-r--r--apps/settings_menu.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index 9e7320eef6..94f6cc74ea 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -428,27 +428,16 @@ static bool bidir_limit(void)
428} 428}
429#endif 429#endif
430 430
431#ifndef SIMULATOR
431/** 432/**
432 * Menu to set the battery capacity 433 * Menu to set the battery capacity
433 */ 434 */
434static bool battery_capacity(void) { 435static bool battery_capacity(void)
435 bool retval = false; 436{
436 437 return set_int(str(LANG_BATTERY_CAPACITY), " mAh", &global_settings.battery_capacity,
437 char* names[] = { "1500 mAh ", "1600 mAh ", 438 &set_battery_capacity, 50, 1500, BATTERY_CAPACITY_MAX );
438 "1700 mAh ", "1800 mAh ",
439 "1900 mAh ", "2000 mAh ",
440 "2100 mAh ", "2200 mAh "
441 };
442
443 retval = set_option( str(LANG_BATTERY_CAPACITY),
444 &global_settings.battery_capacity, names, 8, NULL);
445
446#ifndef SIMULATOR
447 set_battery_capacity(global_settings.battery_capacity);
448#endif /* SIMULATOR */
449
450 return retval;
451} 439}
440#endif
452 441
453#ifdef HAVE_CHARGE_CTRL 442#ifdef HAVE_CHARGE_CTRL
454static bool deep_discharge(void) 443static bool deep_discharge(void)
@@ -742,7 +731,9 @@ static bool system_settings_menu(void)
742#ifdef HAVE_ATA_POWER_OFF 731#ifdef HAVE_ATA_POWER_OFF
743 { str(LANG_POWEROFF), poweroff }, 732 { str(LANG_POWEROFF), poweroff },
744#endif 733#endif
734#ifndef SIMULATOR
745 { str(LANG_BATTERY_CAPACITY), battery_capacity }, 735 { str(LANG_BATTERY_CAPACITY), battery_capacity },
736#endif
746#ifdef HAVE_CHARGE_CTRL 737#ifdef HAVE_CHARGE_CTRL
747 { str(LANG_DISCHARGE), deep_discharge }, 738 { str(LANG_DISCHARGE), deep_discharge },
748 { str(LANG_TRICKLE_CHARGE), trickle_charge }, 739 { str(LANG_TRICKLE_CHARGE), trickle_charge },