[PATCH] fix battery keys if battery is full charged

David Zeuthen david at fubar.dk
Thu Aug 11 06:55:24 PDT 2005


On Thu, 2005-08-11 at 09:15 +0200, Danny Kukawka wrote:
> > I think we should just set these to 0 instead of removing them.
> > Reasoning is that the current is really zero (no energy is flowing),
> > plus it'll make client code much easier, don't you think?
> 
> O.k. I prefer to provide only keys for things we know, but to set them to a 
> default value if the related entry in /proc/acpi/battery/*/{info,state} is 
> unknown is also o.k. for me. But I would propose to set such keys to -1 to 
> know that the real values are currently unknown. What you think?

But the point here is that the values are indeed known and they already
assume sane values. Setting values to -1 sounds sketchy to me.

To go into depth: the battery is fully charged and we're running on
mains means no electricity are flowing from the battery to the computer.
Hence, the "current" is 0. Same with rate. For remaining time you can
make a similar argument, there is simply zero seconds until the battery
is charged, simple because the battery is already charged =).

Cheers,
David


_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list