diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings.c | 3 | ||||
-rw-r--r-- | apps/settings.h | 2 | ||||
-rw-r--r-- | apps/settings_list.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/apps/settings.c b/apps/settings.c index 3a851df0ff..e9f0dc9330 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -852,7 +852,10 @@ void settings_apply(bool read_disk) | |||
852 | #endif | 852 | #endif |
853 | set_poweroff_timeout(global_settings.poweroff); | 853 | set_poweroff_timeout(global_settings.poweroff); |
854 | 854 | ||
855 | #if defined(BATTERY_CAPACITY_INC) && BATTERY_CAPACITY_INC > 0 | ||
855 | set_battery_capacity(global_settings.battery_capacity); | 856 | set_battery_capacity(global_settings.battery_capacity); |
857 | #endif | ||
858 | |||
856 | #if BATTERY_TYPES_COUNT > 1 | 859 | #if BATTERY_TYPES_COUNT > 1 |
857 | set_battery_type(global_settings.battery_type); | 860 | set_battery_type(global_settings.battery_type); |
858 | #endif | 861 | #endif |
diff --git a/apps/settings.h b/apps/settings.h index 7deb2def41..3ba8fe9868 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -619,7 +619,9 @@ struct user_settings | |||
619 | 619 | ||
620 | /* power settings */ | 620 | /* power settings */ |
621 | int poweroff; /* idle power off timer */ | 621 | int poweroff; /* idle power off timer */ |
622 | #if defined(BATTERY_CAPACITY_INC) && BATTERY_CAPACITY_INC > 0 | ||
622 | int battery_capacity; /* in mAh */ | 623 | int battery_capacity; /* in mAh */ |
624 | #endif | ||
623 | 625 | ||
624 | #if BATTERY_TYPES_COUNT > 1 | 626 | #if BATTERY_TYPES_COUNT > 1 |
625 | int battery_type; /* for units which can take multiple types (Ondio). */ | 627 | int battery_type; /* for units which can take multiple types (Ondio). */ |
diff --git a/apps/settings_list.c b/apps/settings_list.c index cab326671a..5a9eeb90ce 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -763,7 +763,7 @@ const struct settings_list settings[] = { | |||
763 | #endif | 763 | #endif |
764 | "max files in dir", UNIT_INT, 50, 10000, 50, | 764 | "max files in dir", UNIT_INT, 50, 10000, 50, |
765 | NULL, NULL, NULL), | 765 | NULL, NULL, NULL), |
766 | #if BATTERY_CAPACITY_INC > 0 | 766 | #if defined(BATTERY_CAPACITY_INC) && BATTERY_CAPACITY_INC > 0 |
767 | INT_SETTING(0, battery_capacity, LANG_BATTERY_CAPACITY, | 767 | INT_SETTING(0, battery_capacity, LANG_BATTERY_CAPACITY, |
768 | BATTERY_CAPACITY_DEFAULT, "battery capacity", UNIT_MAH, | 768 | BATTERY_CAPACITY_DEFAULT, "battery capacity", UNIT_MAH, |
769 | BATTERY_CAPACITY_MIN, BATTERY_CAPACITY_MAX, | 769 | BATTERY_CAPACITY_MIN, BATTERY_CAPACITY_MAX, |