summaryrefslogtreecommitdiffstats
path: root/apps/settings.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-01-30 16:25:46 +0000
committerJens Arnold <amiconn@rockbox.org>2005-01-30 16:25:46 +0000
commit91846a1a8d94dc8c7540efe3bbc8216f6ded7cb2 (patch)
tree8a8f0c328495e0631e568c1bdbe7c151e2590190 /apps/settings.c
parent8a77317e9c7c708153d8547bfccc3b4ef2324e3c (diff)
downloadrockbox-91846a1a8d94dc8c7540efe3bbc8216f6ded7cb2.tar.gz
rockbox-91846a1a8d94dc8c7540efe3bbc8216f6ded7cb2.zip
New Ondio feature: Battery type setting, for correct battery level display.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5717 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/settings.c b/apps/settings.c
index de4254edad..e16d546bb6 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -235,6 +235,10 @@ static const struct bit_entry rtc_bits[] =
/* new stuff to be added here */
/* If values are just added to the end, no need to bump the version. */
+#if BATTERY_TYPES_COUNT > 1
+ {1, S_O(battery_type), 0, "battery type", "alkaline,nimh" },
+#endif
+
/* Current sum of bits: 259 (worst case) */
/* Sum of all bit sizes must not grow beyond 288! */
};
@@ -759,6 +763,9 @@ void settings_apply(void)
#endif
set_battery_capacity(global_settings.battery_capacity);
+#if BATTERY_TYPES_COUNT > 1
+ set_battery_type(global_settings.battery_type);
+#endif
#ifdef HAVE_LCD_BITMAP
lcd_set_invert_display(global_settings.invert);