Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Charging/battery patch (was Re: BATTERY-FAQ and the FM)

Charging/battery patch (was Re: BATTERY-FAQ and the FM)

From: Mike Holden <rockbox_at_mikeholden.uklinux.net>
Date: Sat, 14 Jun 2003 11:41:44 +0100 (BST)

Magnus Holmgren said:
> Mike Holden wrote:
>
>>> Now, if someone can explain why this happens in the latest builds: my
>>> battery indicator is numeric and always goes 0-34-68-100 when plugged
>>> in. This didn't happen until I got a build earlier this week.
>>> Unplugged it is steady, which is also the way it was before even when
>>> plugged in.
>>
>>
>> This was introduced with the change to status.c (I think) a week or so
>> ago. The problem is that some of the code applies to all units
>> (player, recorder, FM), and some of it is only relevant where
>> HAVE_CHARGE_CTRL is defined (i.e. recorder only, not FM). Hopefully I
>> can look at this soon, as I hope to be able to commit some time to
>> look at the battery/charging patch again shortly.
>
> I'd say it is relevant for non-recorders also. For a player - which,
> like the FM recorder, handles the charging in hardware - it has behaved
> like this for quite some time, as an indicator that the charger is
> plugged in (during charging, the voltage readings aren't that exact,
> IIRC, so it isn't that interesting to show a normal battery meter then).
> I can understand if it looks a bit odd in numeric mode (but didn't
> someone at least consider making it switch to graphic mode during
> charging?). :)
>
> The code in question is quite old, but it was cleaned up a bit recently
> (there was different code for the player and the recorder doing the same
> thing).

I am about to do some more work on my patch for charging/battery display,
so I think that one final round of discussion on the layout would be
appropriate at this stage.

The main points were:

Battery status icon: this will always be displayed in the mode the user
has selected (graphical or numeric), and will always show the current
battery charge percent. When charging, this will be capped to not show
100%. It is currently capped at 99%, but I feel this is too close to 100%
and users may still remove the charger on the basis that it is "almost
done" when in reality it may still be some way off full. I would
personally cap at maybe 89%, 90% or maybe 95%.

Charger plugged icon: This will not be shown when the charger is not
plugged in. When the charger is plugged in, but the unit is not charging,
the icon will be solid. When the charger is charging, the icon will flash
1 second on, 1 second off. Can we detect whether the player is currently
charging? On FM, I can look at the external power level to see whether
voltage is being applied or not.

USB mode: when the USB plug is inserted, any playback items will be
removed from the status line (volume, stop/play/pause, shuffle, repeat
etc), leaving battery level/charging status, plus the current time. The
current battery runtime will be displayed on the bottom of the screen,
with a suitable prefix to indicate what the time means. On recorder/FM,
this can be text such as "Runtime:", "Battery time:" or "Battery life:",
but on player this would be too big and would cause ugly scrolling. Can we
display a battery icon here on player (same as the battery status one)? If
we can, maybe we should do this on recorder/FM as well for consistency, or
would text be better? Deep discharge charging mode will be disabled during
USB mode.

Debug battery screen: Fix screen to show charger plugged and charging
status for FM (these items are currently missing).

Any comments on the above, or any other suggestions?
-- 
Mike Holden
Rockbox page: http://www.mikeholden.org/~rockbox
Received on 2003-06-14

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy