From c76fbf7162e598895b1308f1855b0f70629968fc Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Sat, 19 Feb 2005 00:34:15 +0000 Subject: Ondio: disk indication in the status bar, to compensate for lacking LED git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6012 a1c6a512-1295-4272-9138-f99709370657 --- apps/status.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'apps/status.c') 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 @@ #include "font.h" #endif #include "powermgmt.h" +#include "led.h" static enum playmode ff_mode; @@ -55,6 +56,9 @@ struct status_info { bool keylock; bool battery_safe; bool redraw_volume; /* true if the volume gauge needs updating */ +#ifndef HAVE_LED + bool led; /* disk LED simulation in the status bar */ +#endif }; void status_init(void) @@ -155,6 +159,9 @@ void status_draw(bool force_redraw) info.keylock = keys_locked; info.repeat = global_settings.repeat_mode; info.playmode = current_playmode(); +#ifndef HAVE_LED + info.led = led_read(); +#endif /* only redraw if forced to, or info has changed */ if (force_redraw || @@ -181,7 +188,7 @@ void status_draw(bool force_redraw) /* animate battery if charging */ if ((charge_state == 1) || - (charge_state == 2)) { +€ (charge_state == 2)) { #else global_settings.runtime = 0; lasttime = current_tick; @@ -232,6 +239,10 @@ void status_draw(bool force_redraw) statusbar_icon_lock(); #ifdef HAVE_RTC statusbar_time(info.hour, info.minute); +#endif +#ifndef HAVE_LED + if (info.led) + statusbar_led(); #endif lcd_update_rect(0, 0, LCD_WIDTH, STATUSBAR_HEIGHT); lastinfo = info; -- cgit v1.2.3