Hal 0.5.0
David Zeuthen
david at fubar.dk
Thu Mar 24 07:54:09 PST 2005
On Thu, 2005-03-24 at 07:53 +0000, Richard Hughes wrote:
> David, having one battery shared between two devices isn't great from a
> abstraction perspective! :-) I appreciate this is w-i-p.
You know, it's not like I don't know that :-)
However, there's a certain limit to what we can get out of the hardware.
Similarly, e.g. APM exports both my batteries in my old Dell Inspiron
7500 as a single one. It's just something we need to deal with.
I just asked for the CSR spec to see if we indeed could extract battery
information per device.
> A little point - don't we need:
>
> battery.charge_level.rate = 0 (hardcoded to zero as unknown)
> (Mandatory in HAL spec)
I thought I made that optional, oh, I did, here is the patch I committed
for that:
> <row>
> <entry><literal>battery.charge_level.rate</literal>
> (int)</entry>
> <entry></entry>
> - <entry>Yes</entry>
> + <entry>No</entry>
It's optional because we don't necessarily know, and if we don't know we
shouldn't set it to zero, because obviously battery charge is
decreasing/increasing and we shouldn't lie to the user :-)
>
> battery.charge_level.unit = "CSR"
No, you got it wrong; CSR is just the name of the protocol used to
extract this kind of information.
> (Should be mandatory in HAL spec in my opinion...)
No. And if you look at the CSR protocol you get levels from 0 to 7.
All this just means that programs like g-p-m need to be a bit careful in
what properties to expect. Yes, that's a pain, but that's
programming :-)
David
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list