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

Rockbox mail archive

Subject: Re: I, battery man ;-) (was: Question to powermgm.c charging algorithm)

Re: I, battery man ;-) (was: Question to powermgm.c charging algorithm)

From: Heikki Hannikainen <>
Date: Tue, 13 Aug 2002 08:18:46 +0300 (EEST)

  Hi Uwe,

On Mon, 12 Aug 2002, Uwe Freese wrote:

> For example:
> if ((ajb_unused && delta < -0.01) || (delta < -0.05))

  Yes, something like that could be useful, needs testing and
experimentation to see what actually works.

  One thing to play with would be making the CPU sleep while the device is
unused, this would lower the battery consumption a lot, but this would
probably require hacking the multithreading "kernel".

> HH> All of this can be seen in firmware/powermgmt.c and apps/debug_menu.c's
> HH> view_battery(). The power thread cannot directly write to the LCD without
> HH> messing up with whatever is currently running there, so it updates a
> HH> global char[] variable and the foreground applications (the status bar,
> HH> view_battery() etc) display them.
> How about adding a status string of the charger thread to the battery
> status display in the debug menu? It would be helpful for testing a
> charging algorithm to see what it actually does! But I don't know how
> I can do that.

  That's exactly what is done - powermgmt.c exports char
power_message[POWER_MESSAGE_LEN], which is updated by power_thread and
displayed by the power debugger. Only problem is that the display isn't
very long, maybe we could make the debugger scroll the long line. 8-)

> Thanks for your hints. I'll look into the actual cvs code this
> evening and test a little bit.

  Happy hacking!

  - Hessu
Received on 2002-08-13

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