diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/menus/settings_menu.c | 2 | ||||
-rw-r--r-- | apps/plugins/battery_bench.c | 7 | ||||
-rw-r--r-- | apps/settings.c | 2 | ||||
-rw-r--r-- | apps/settings.h | 3 | ||||
-rw-r--r-- | apps/settings_list.c | 8 |
5 files changed, 10 insertions, 12 deletions
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index 94b697aada..1dce12907f 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c | |||
@@ -259,7 +259,7 @@ static int usbcharging_callback(int action, | |||
259 | MENUITEM_SETTING(usb_charging, &global_settings.usb_charging, usbcharging_callback); | 259 | MENUITEM_SETTING(usb_charging, &global_settings.usb_charging, usbcharging_callback); |
260 | #endif /* HAVE_USB_CHARGING_ENABLE */ | 260 | #endif /* HAVE_USB_CHARGING_ENABLE */ |
261 | MAKE_MENU(battery_menu, ID2P(LANG_BATTERY_MENU), 0, Icon_NOICON, | 261 | MAKE_MENU(battery_menu, ID2P(LANG_BATTERY_MENU), 0, Icon_NOICON, |
262 | #if defined(BATTERY_CAPACITY_INC) && BATTERY_CAPACITY_INC > 0 | 262 | #if BATTERY_CAPACITY_INC > 0 |
263 | &battery_capacity, | 263 | &battery_capacity, |
264 | #endif | 264 | #endif |
265 | #if BATTERY_TYPES_COUNT > 1 | 265 | #if BATTERY_TYPES_COUNT > 1 |
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index 53931d1930..e918fae39d 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c | |||
@@ -567,7 +567,12 @@ enum plugin_status plugin_start(const void* parameter) | |||
567 | ,MODEL_NAME,rb->rbversion); | 567 | ,MODEL_NAME,rb->rbversion); |
568 | 568 | ||
569 | rb->fdprintf(fd, "# Battery type: %d mAh Buffer Entries: %d\n", | 569 | rb->fdprintf(fd, "# Battery type: %d mAh Buffer Entries: %d\n", |
570 | rb->global_settings->battery_capacity, (int)BUF_ELEMENTS); | 570 | #if BATTERY_CAPACITY_INC > 0 |
571 | rb->global_settings->battery_capacity, | ||
572 | #else | ||
573 | BATTERY_CAPACITY_DEFAULT, | ||
574 | #endif | ||
575 | (int)BUF_ELEMENTS); | ||
571 | 576 | ||
572 | rb->fdprintf(fd, "# Rockbox has been running for %02d:%02d:%02d\n", | 577 | rb->fdprintf(fd, "# Rockbox has been running for %02d:%02d:%02d\n", |
573 | HMS((unsigned)start_tick/HZ)); | 578 | HMS((unsigned)start_tick/HZ)); |
diff --git a/apps/settings.c b/apps/settings.c index c7dd2cf9ab..6d49beb5e3 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -835,7 +835,7 @@ void settings_apply(bool read_disk) | |||
835 | set_keypress_restarts_sleep_timer( | 835 | set_keypress_restarts_sleep_timer( |
836 | global_settings.keypress_restarts_sleeptimer); | 836 | global_settings.keypress_restarts_sleeptimer); |
837 | 837 | ||
838 | #if defined(BATTERY_CAPACITY_INC) && BATTERY_CAPACITY_INC > 0 | 838 | #if BATTERY_CAPACITY_INC > 0 |
839 | /* only call if it's really exchangable */ | 839 | /* only call if it's really exchangable */ |
840 | set_battery_capacity(global_settings.battery_capacity); | 840 | set_battery_capacity(global_settings.battery_capacity); |
841 | #endif | 841 | #endif |
diff --git a/apps/settings.h b/apps/settings.h index c0a913c1c6..ce7421d95e 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -608,10 +608,9 @@ struct user_settings | |||
608 | 608 | ||
609 | /* power settings */ | 609 | /* power settings */ |
610 | int poweroff; /* idle power off timer */ | 610 | int poweroff; /* idle power off timer */ |
611 | #if BATTERY_CAPACITY_DEFAULT > 0 | 611 | #if BATTERY_CAPACITY_INC > 0 |
612 | int battery_capacity; /* in mAh */ | 612 | int battery_capacity; /* in mAh */ |
613 | #endif | 613 | #endif |
614 | |||
615 | #if BATTERY_TYPES_COUNT > 1 | 614 | #if BATTERY_TYPES_COUNT > 1 |
616 | int battery_type; /* for units which can take multiple types (Ondio). */ | 615 | int battery_type; /* for units which can take multiple types (Ondio). */ |
617 | #endif | 616 | #endif |
diff --git a/apps/settings_list.c b/apps/settings_list.c index afab6dce5b..f7d7007b9c 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -1036,13 +1036,7 @@ const struct settings_list settings[] = { | |||
1036 | NULL, NULL, NULL), | 1036 | NULL, NULL, NULL), |
1037 | /* use this setting for user code even if there's no exchangable battery | 1037 | /* use this setting for user code even if there's no exchangable battery |
1038 | * support enabled */ | 1038 | * support enabled */ |
1039 | #if BATTERY_CAPACITY_DEFAULT > 0 | 1039 | #if BATTERY_CAPACITY_INC > 0 |
1040 | /* define min/max/inc for this file if there's only one battery */ | ||
1041 | #ifndef BATTERY_CAPACITY_MIN | ||
1042 | #define BATTERY_CAPACITY_MIN BATTERY_CAPACITY_DEFAULT | ||
1043 | #define BATTERY_CAPACITY_MAX BATTERY_CAPACITY_DEFAULT | ||
1044 | #define BATTERY_CAPACITY_INC 0 | ||
1045 | #endif | ||
1046 | #if defined(IPOD_VIDEO) && !defined(SIMULATOR) | 1040 | #if defined(IPOD_VIDEO) && !defined(SIMULATOR) |
1047 | /* its easier to leave this one un-macro()ed for the time being */ | 1041 | /* its easier to leave this one un-macro()ed for the time being */ |
1048 | { F_T_INT|F_DEF_ISFUNC|F_INT_SETTING, &global_settings.battery_capacity, | 1042 | { F_T_INT|F_DEF_ISFUNC|F_INT_SETTING, &global_settings.battery_capacity, |