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

Rockbox mail archive

Subject: Powermanagement rework

Powermanagement rework

From: Bertrik Sikken <>
Date: Tue, 12 Aug 2008 21:59:24 +0200


How about we clean up powermanagement.c a little further?

After looking through the code, I have some suggestions:
1) There seems to be some low-level battery voltage logging in
    powermanagement.c when DEBUG_FILE is defined. Do we still needs this
    or can we remove it and just use battery bench instead?
2) There's a couple of functions that are only used for the simulator.
    Can't we move those to stubs.c (possibly expand stubs.c into
    sub-system specific files if it gets too big)?
3) There's a huge chunk of code (charging_algorithm_big_step) that
    only gets used when CHARGING_CONTROL is defined. This seems to be
    some kind of -dV/dt charging algorithm.
    Can't we move this to a separate file?
    We could (for example) move specific charging algorithms into
    separate files and put their state machines into a charging_state()
    function that is called from the main power thread.
4) If CHARGING_CONTROL really just means a -dV/dt charging algorithm,
    shouldn't we rename it like that?

Kind regards,
Received on 2008-08-12

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