Battery Life Estimation: First try

Richard A. Smith richard at
Fri May 2 22:07:25 EDT 2008

Martin Dengler wrote:
> Martin
> 1. Obviously I wouldn't want to submit my hack as a patch, but what
> should be done?  Should we add this logic to the Hal so I can retrieve
> it via dbus?

Dunno.  dbus should perhaps be able to feed up the ACR value when 
requested but I don't think its the place for the math.  How does gnome 
power manager do it?.

> 2. when I unplugged the AC and my XO/battery went from charging to
> discharging, I got a divide-by-zero error:

Integer math issue.  I was watching for the avg draw to be zero but not 
the instantaneous draw.  I added a check for DRAW_INST to be zero as 
well.  I don't have any XO's with me though so I can't test.

Richard Smith  <richard at>
One Laptop Per Child

More information about the Devel mailing list