dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

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

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

From: Mike Holden <>
Date: Sat, 14 Jun 2003 13:18:16 +0100 (BST)

Magnus Holmgren said:
> Mike Holden wrote:
>> 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%.
> Would it be possible to use a different voltage curve during charge? At
> least for the player, the voltage is typically a bit higher when the
> charger is plugged (e.g., with full batteries the voltage is 0.10 to
> 0.15 volts higher when the charger is plugged).
>> 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.
> Is there any place in the debug menus I can look for this?

On the FM, it's the ADC_EXT_POWER value, which is AN7 in the View IO Ports
screen. AN0 shows 3FF when not plugged, and hovers around zero when
charger is plugged in. AN0 is used to detect charger plugged or not, and I
use AN7 to check whether charging is active or not. Basically, have a look
to see if any values seem to go up and down with the charger being plugged
in and out, and also vary during the charging cycle.

>> 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.
> For the player, the same icon can't be used. Something similar could be
> created using custom chars (each being 5x8 pixels), but I guess text,
> like this, would be better: "Batt: hh:mm" (btw, my player is patched to
> show percentage instead of "Batt", but that's not very informative for
> the average user).

What's the reason we can't use the same icon? Is the char "hardcoded" in
the screen LCD map? Is the status line different from the other lines in
some way? If we need to create a specific character for this, I would need
to call upon the "artistic geniuses" of the list for assistance, as I'm a
programmer, not a graphic designer! Do we have any space characters in the
character set? Is a short text looking like the better option for this
(e.g. "Batt:")

To avoid confusion with the clock, I was going to make the time display
have an "h" character in place of the ":", so it will look like 10h15.
Mike Holden
Rockbox page:
Received on 2003-06-14

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