diff options
Diffstat (limited to 'apps/status.c')
-rw-r--r-- | apps/status.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/status.c b/apps/status.c index 03badc5b75..1da51a10a0 100644 --- a/apps/status.c +++ b/apps/status.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include "font.h" | 35 | #include "font.h" |
36 | #endif | 36 | #endif |
37 | #include "powermgmt.h" | 37 | #include "powermgmt.h" |
38 | #include "led.h" | ||
38 | 39 | ||
39 | static enum playmode ff_mode; | 40 | static enum playmode ff_mode; |
40 | 41 | ||
@@ -55,6 +56,9 @@ struct status_info { | |||
55 | bool keylock; | 56 | bool keylock; |
56 | bool battery_safe; | 57 | bool battery_safe; |
57 | bool redraw_volume; /* true if the volume gauge needs updating */ | 58 | bool redraw_volume; /* true if the volume gauge needs updating */ |
59 | #ifndef HAVE_LED | ||
60 | bool led; /* disk LED simulation in the status bar */ | ||
61 | #endif | ||
58 | }; | 62 | }; |
59 | 63 | ||
60 | void status_init(void) | 64 | void status_init(void) |
@@ -155,6 +159,9 @@ void status_draw(bool force_redraw) | |||
155 | info.keylock = keys_locked; | 159 | info.keylock = keys_locked; |
156 | info.repeat = global_settings.repeat_mode; | 160 | info.repeat = global_settings.repeat_mode; |
157 | info.playmode = current_playmode(); | 161 | info.playmode = current_playmode(); |
162 | #ifndef HAVE_LED | ||
163 | info.led = led_read(); | ||
164 | #endif | ||
158 | 165 | ||
159 | /* only redraw if forced to, or info has changed */ | 166 | /* only redraw if forced to, or info has changed */ |
160 | if (force_redraw || | 167 | if (force_redraw || |
@@ -181,7 +188,7 @@ void status_draw(bool force_redraw) | |||
181 | 188 | ||
182 | /* animate battery if charging */ | 189 | /* animate battery if charging */ |
183 | if ((charge_state == 1) || | 190 | if ((charge_state == 1) || |
184 | (charge_state == 2)) { | 191 | € (charge_state == 2)) { |
185 | #else | 192 | #else |
186 | global_settings.runtime = 0; | 193 | global_settings.runtime = 0; |
187 | lasttime = current_tick; | 194 | lasttime = current_tick; |
@@ -233,6 +240,10 @@ void status_draw(bool force_redraw) | |||
233 | #ifdef HAVE_RTC | 240 | #ifdef HAVE_RTC |
234 | statusbar_time(info.hour, info.minute); | 241 | statusbar_time(info.hour, info.minute); |
235 | #endif | 242 | #endif |
243 | #ifndef HAVE_LED | ||
244 | if (info.led) | ||
245 | statusbar_led(); | ||
246 | #endif | ||
236 | lcd_update_rect(0, 0, LCD_WIDTH, STATUSBAR_HEIGHT); | 247 | lcd_update_rect(0, 0, LCD_WIDTH, STATUSBAR_HEIGHT); |
237 | lastinfo = info; | 248 | lastinfo = info; |
238 | #endif | 249 | #endif |