From 77e05c680388838b489e53f621c987b531d968dd Mon Sep 17 00:00:00 2001 From: Heikki Hannikainen Date: Mon, 12 Aug 2002 11:08:50 +0000 Subject: info menu: show 'charging' instead of charge percentage while charging, the percentage is incorrect anyway, and an indication of charging is good. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1681 a1c6a512-1295-4272-9138-f99709370657 --- apps/main_menu.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/main_menu.c b/apps/main_menu.c index a71bbccfd8..4b83330a35 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c @@ -31,6 +31,7 @@ #include "playlist.h" #include "settings.h" #include "settings_menu.h" +#include "power.h" #include "powermgmt.h" #include "sound_menu.h" @@ -153,13 +154,21 @@ void show_info(void) snprintf(s, sizeof(s), "Buffer: %d.%02d Mb", integer, decimal); lcd_puts(0, 2, s); #endif - + #ifdef HAVE_LCD_CHARCELLS snprintf(s, sizeof(s), "Batt: %d%%%s", battery_level(), battery_level_safe() ? "" : "!"); lcd_puts(0, 1, s); +#else +#ifdef HAVE_CHARGE_CTRL + if (charger_enabled) + snprintf(s, sizeof(s), "Battery: charging"); + else + snprintf(s, sizeof(s), "Battery: %d%%%s", battery_level(), battery_level_safe() ? "" : " !!"); + lcd_puts(0, 3, s); #else snprintf(s, sizeof(s), "Battery: %d%%%s", battery_level(), battery_level_safe() ? "" : " !!"); lcd_puts(0, 3, s); +#endif #endif lcd_update(); -- cgit v1.2.3