battery.remaining_time.calculate_per_time

Richard Hughes hughsient at gmail.com
Thu Apr 26 11:15:05 PDT 2007


On Thu, 2007-04-26 at 10:59 -0700, Artem Kachitchkine wrote:
> What are the input values for the g-p-m algorithms? The original ACPI
> values (i.e. reporting.* and voltage.*) ? 

Nope (although the ACPI method is used as a fallback) - I'm actually
profiling how long the battery lasts for each complete percentage
change, and then integrating these to get a time for any percentage
value. This allows us to predict how long the battery will actually last
for the user (typically) - the algorithm self converges over time.

This lets us have a battery 100% charged and be able to say "This
battery will last approximately 2 hours" even when the discharge profile
is non-linear, the smart chip only reports some percentage states and
the battery has one dead cell.

See my blog (hughsient.livejournal.com) for screenshots and more detail.

Richard.




More information about the hal mailing list