Battery Life Estimation: First try
martin at martindengler.com
Sat May 3 09:32:52 EDT 2008
On Fri, May 02, 2008 at 10:07:25PM -0400, Richard A. Smith wrote:
> Martin Dengler wrote:
> >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?.
Based on a g-p-m presentation and the results[2,3] of my 5-10 minutes
of looking through the g-p-m source, it seems that g-p-m relies on the
HAL making "battery.remaining_time" (time-in-seconds) available. So
it would appear that a hal addon/backend would be the place for the math,
but I think I've made clear how much experience I have in these
> >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.
Thanks for the problem-pointer for the incredibly lazy (me).
2. Line 315 in gpm-cell.c:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the Devel