From 91846a1a8d94dc8c7540efe3bbc8216f6ded7cb2 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sun, 30 Jan 2005 16:25:46 +0000 Subject: 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 --- apps/settings.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'apps/settings.c') 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); -- cgit v1.2.3