diff options
Diffstat (limited to 'apps/settings_menu.c')
-rw-r--r-- | apps/settings_menu.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/settings_menu.c b/apps/settings_menu.c index 63f1415af8..b19f2eda3c 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c | |||
@@ -707,6 +707,19 @@ static bool battery_capacity(void) | |||
707 | &set_battery_capacity, 50, BATTERY_CAPACITY_MIN, | 707 | &set_battery_capacity, 50, BATTERY_CAPACITY_MIN, |
708 | BATTERY_CAPACITY_MAX ); | 708 | BATTERY_CAPACITY_MAX ); |
709 | } | 709 | } |
710 | |||
711 | #if BATTERY_TYPES_COUNT > 1 | ||
712 | static bool battery_type(void) | ||
713 | { | ||
714 | static const struct opt_items names[] = { | ||
715 | { STR(LANG_BATTERY_TYPE_ALKALINE) }, | ||
716 | { STR(LANG_BATTERY_TYPE_NIMH) } | ||
717 | }; | ||
718 | |||
719 | return set_option(str(LANG_BATTERY_TYPE), &global_settings.battery_type, | ||
720 | INT, names, 2, set_battery_type); | ||
721 | } | ||
722 | #endif | ||
710 | #endif | 723 | #endif |
711 | 724 | ||
712 | #ifdef HAVE_CHARGE_CTRL | 725 | #ifdef HAVE_CHARGE_CTRL |
@@ -1250,6 +1263,9 @@ static bool battery_settings_menu(void) | |||
1250 | #endif | 1263 | #endif |
1251 | #ifndef SIMULATOR | 1264 | #ifndef SIMULATOR |
1252 | { ID2P(LANG_BATTERY_CAPACITY), battery_capacity }, | 1265 | { ID2P(LANG_BATTERY_CAPACITY), battery_capacity }, |
1266 | #if BATTERY_TYPES_COUNT > 1 | ||
1267 | { ID2P(LANG_BATTERY_TYPE), battery_type }, | ||
1268 | #endif | ||
1253 | #else | 1269 | #else |
1254 | #ifndef HAVE_CHARGE_CTRL | 1270 | #ifndef HAVE_CHARGE_CTRL |
1255 | { "Dummy", NULL }, /* to have an entry at all, in the simulator */ | 1271 | { "Dummy", NULL }, /* to have an entry at all, in the simulator */ |