diff options
author | Markus Braun <markus.braun@krawel.de> | 2002-08-07 13:05:13 +0000 |
---|---|---|
committer | Markus Braun <markus.braun@krawel.de> | 2002-08-07 13:05:13 +0000 |
commit | 709382c801254ba624c8e1ab5b63e637f2ed3b70 (patch) | |
tree | 5183f963458aca0fecaf995bf35ff99ab643e6de | |
parent | 44ca7632376bdfdbd43ca74b0fcd786f74da747b (diff) | |
download | rockbox-709382c801254ba624c8e1ab5b63e637f2ed3b70.tar.gz 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
-rw-r--r-- | apps/recorder/icons.c | 2 | ||||
-rw-r--r-- | apps/status.c | 17 |
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] = | |||
73 | static unsigned char bitmap_icon_7x8[][7] = | 73 | static unsigned char bitmap_icon_7x8[][7] = |
74 | { | 74 | { |
75 | /* Power plug */ | 75 | /* Power plug */ |
76 | {0x08,0x1c,0x1c,0x3e,0x3e,0x14,0x14}, | 76 | {0x08,0x1c,0x3e,0x3e,0x3e,0x14,0x14}, |
77 | /* Speaker */ | 77 | /* Speaker */ |
78 | {0x00,0x1c,0x1c,0x3e,0x7f,0x00,0x00}, | 78 | {0x00,0x1c,0x1c,0x3e,0x7f,0x00,0x00}, |
79 | /* Speaker mute */ | 79 | /* 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; | |||
34 | 34 | ||
35 | #ifdef HAVE_LCD_BITMAP | 35 | #ifdef HAVE_LCD_BITMAP |
36 | bool statusbar_enabled = true; | 36 | bool statusbar_enabled = true; |
37 | long last_tick; | ||
38 | bool plug_state; | ||
37 | #endif | 39 | #endif |
38 | 40 | ||
39 | void status_init(void) | 41 | void status_init(void) |
40 | { | 42 | { |
43 | #ifdef HAVE_LCD_BITMAP | ||
44 | last_tick = current_tick; | ||
45 | #endif | ||
41 | status_set_playmode(STATUS_STOP); | 46 | status_set_playmode(STATUS_STOP); |
42 | } | 47 | } |
43 | 48 | ||
@@ -130,7 +135,17 @@ void status_draw(void) | |||
130 | if(global_settings.statusbar && statusbar_enabled) { | 135 | if(global_settings.statusbar && statusbar_enabled) { |
131 | statusbar_wipe(); | 136 | statusbar_wipe(); |
132 | #ifdef HAVE_CHARGE_CTRL | 137 | #ifdef HAVE_CHARGE_CTRL |
133 | statusbar_icon_battery(battlevel,charger_enabled); | 138 | if(charger_inserted()) { |
139 | if(!charger_enabled) | ||
140 | plug_state=true; | ||
141 | else if(current_tick-last_tick>HZ) { | ||
142 | plug_state=!plug_state; | ||
143 | last_tick=current_tick; | ||
144 | } | ||
145 | } | ||
146 | else | ||
147 | plug_state=false; | ||
148 | statusbar_icon_battery(battlevel,plug_state); | ||
134 | #else | 149 | #else |
135 | statusbar_icon_battery(battlevel,false); | 150 | statusbar_icon_battery(battlevel,false); |
136 | #endif | 151 | #endif |