1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Heikki Hannikainen 2002-08-12 11:08:50 +00:00
parent 5ba6f01bde
commit 77e05c6803

View file

@ -31,6 +31,7 @@
#include "playlist.h" #include "playlist.h"
#include "settings.h" #include "settings.h"
#include "settings_menu.h" #include "settings_menu.h"
#include "power.h"
#include "powermgmt.h" #include "powermgmt.h"
#include "sound_menu.h" #include "sound_menu.h"
@ -157,9 +158,17 @@ void show_info(void)
#ifdef HAVE_LCD_CHARCELLS #ifdef HAVE_LCD_CHARCELLS
snprintf(s, sizeof(s), "Batt: %d%%%s", battery_level(), battery_level_safe() ? "" : "!"); snprintf(s, sizeof(s), "Batt: %d%%%s", battery_level(), battery_level_safe() ? "" : "!");
lcd_puts(0, 1, s); 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 #else
snprintf(s, sizeof(s), "Battery: %d%%%s", battery_level(), battery_level_safe() ? "" : " !!"); snprintf(s, sizeof(s), "Battery: %d%%%s", battery_level(), battery_level_safe() ? "" : " !!");
lcd_puts(0, 3, s); lcd_puts(0, 3, s);
#endif
#endif #endif
lcd_update(); lcd_update();