summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMarkus Braun <markus.braun@krawel.de>2002-08-07 13:05:13 +0000
committerMarkus Braun <markus.braun@krawel.de>2002-08-07 13:05:13 +0000
commit709382c801254ba624c8e1ab5b63e637f2ed3b70 (patch)
tree5183f963458aca0fecaf995bf35ff99ab643e6de /apps
parent44ca7632376bdfdbd43ca74b0fcd786f74da747b (diff)
downloadrockbox-709382c801254ba624c8e1ab5b63e637f2ed3b70.tar.gz
rockbox-709382c801254ba624c8e1ab5b63e637f2ed3b70.tar.bz2
rockbox-709382c801254ba624c8e1ab5b63e637f2ed3b70.zip
Power plug is shown when charger is attached and blinking when charging is enabled
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1594 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/recorder/icons.c2
-rw-r--r--apps/status.c17
2 files changed, 17 insertions, 2 deletions
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c
index 482c764b52..89d7186224 100644
--- a/apps/recorder/icons.c
+++ b/apps/recorder/icons.c
@@ -73,7 +73,7 @@ unsigned char bitmap_icons_6x8[LastIcon][6] =
static unsigned char bitmap_icon_7x8[][7] =
{
/* Power plug */
- {0x08,0x1c,0x1c,0x3e,0x3e,0x14,0x14},
+ {0x08,0x1c,0x3e,0x3e,0x3e,0x14,0x14},
/* Speaker */
{0x00,0x1c,0x1c,0x3e,0x7f,0x00,0x00},
/* Speaker mute */
diff --git a/apps/status.c b/apps/status.c
index a106641a40..a41eab91b2 100644
--- a/apps/status.c
+++ b/apps/status.c
@@ -34,10 +34,15 @@ static enum playmode current_mode = STATUS_STOP;
#ifdef HAVE_LCD_BITMAP
bool statusbar_enabled = true;
+long last_tick;
+bool plug_state;
#endif
void status_init(void)
{
+#ifdef HAVE_LCD_BITMAP
+ last_tick = current_tick;
+#endif
status_set_playmode(STATUS_STOP);
}
@@ -130,7 +135,17 @@ void status_draw(void)
if(global_settings.statusbar && statusbar_enabled) {
statusbar_wipe();
#ifdef HAVE_CHARGE_CTRL
- statusbar_icon_battery(battlevel,charger_enabled);
+ if(charger_inserted()) {
+ if(!charger_enabled)
+ plug_state=true;
+ else if(current_tick-last_tick>HZ) {
+ plug_state=!plug_state;
+ last_tick=current_tick;
+ }
+ }
+ else
+ plug_state=false;
+ statusbar_icon_battery(battlevel,plug_state);
#else
statusbar_icon_battery(battlevel,false);
#endif