From 34a4111adeb00c5bd806c54622c14a2b80d05226 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Wed, 3 Dec 2003 23:21:13 +0000 Subject: Battery meter now shows '?' after boot instead of nothing at all. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4103 a1c6a512-1295-4272-9138-f99709370657 --- apps/status.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'apps/status.c') diff --git a/apps/status.c b/apps/status.c index 7e9233a63f..68d6ac74c1 100644 --- a/apps/status.c +++ b/apps/status.c @@ -40,7 +40,7 @@ static enum playmode current_mode = STATUS_STOP; static long switch_tick; static int battery_charge_step = 0; static bool plug_state; -static bool battery_state; +static bool battery_state = true; struct status_info { int battlevel; @@ -167,7 +167,8 @@ void status_draw(bool force_redraw) battery_state = true; else { /* blink battery if level is low */ - if(TIME_AFTER(current_tick, switch_tick)) { + if(TIME_AFTER(current_tick, switch_tick) && + (info.battlevel > -1)) { switch_tick = current_tick+HZ; battery_state =! battery_state; } @@ -175,7 +176,7 @@ void status_draw(bool force_redraw) } #ifdef HAVE_LCD_BITMAP - if (battery_state && (info.battlevel > -1)) + if (battery_state) statusbar_icon_battery(info.battlevel, plug_state); statusbar_icon_volume(info.volume); -- cgit v1.2.3