PMU: battery charge information totally wrong

Johannes Berg johannes at sipsolutions.net
Mon May 7 12:46:55 PDT 2007


Hi,

g-p-m now displays a lot of statistics on the battery so when I looked
at it I noticed that my powerbook is supposed to use less than 2W which
is not quite reasonable :)

The code says:

                /* we don't know the unit here :-/ */
                /*hal_device_property_set_string (d, "battery.charge_level.unit", "percent");*/

Actually, looking at the kernel code and the proc output, it's quite
clear that the unit is mA and mV, so the charge_level.rate would be easy
to calculate as (voltage*amperage)/1000 [mW].

johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/hal/attachments/20070507/3d43a019/attachment.pgp


More information about the hal mailing list