Feature requests for hal battery backend.

Danny Kukawka danny.kukawka at web.de
Sat Jul 30 15:36:00 PDT 2005


On Saturday 30 July 2005 23:19, Richard Hughes wrote:
> Okay, what about doing this:
>
> battery.charge_level.type = {percent|csr|mWh} NOT mAh
>
> APM / UPS
> battery.charge_level.current = x
> battery.charge_level.percentage = x
> battery.charge_level.last_full = 100
> battery.charge_level.design = 100
> battery.charge_level.type = {percent}
>
> CSR
> battery.charge_level.current = x
> battery.charge_level.last_full = 7
> battery.charge_level.design = 7
> battery.charge_level.percentage = x/7
> battery.charge_level.type = {csr}
>
> ACPI / PMU
> battery.charge_level.current = x	/* normalised */
> battery.charge_level.last_full = x	/* normalised */
> battery.charge_level.design = x		/* normalised */
> battery.charge_level.rate = x		/* normalised */
> battery.charge_level.percentage = x
> battery.charge_level.type = {mWh}
>
> battery.reporting.type = {mWh|mAh|mJ|whatever}
> battery.reporting.current = x		/* mWh|mAh|Odd */
> battery.reporting.last_full = x		/* mWh|mAh|Odd */
> battery.reporting.design = x		/* mWh|mAh|Odd */
> battery.reporting.rate = x		/* mWh|mAh|Odd */
>
> the reporting fields being the ones got from hardware, and the
> charge_level fields the normalised ones used.

Is it such a good idea to change the meaning/values of the 
battery.charge_level.* keys? If a programm already use this keys (e.g. to 
calculate the remainig time ;-) ) and expected the values as provided 
in /proc/acpi the program maybe need to be changed.

I would prefer to add new keys for normalised values/units, so everyone is 
free to use the _new_ keys if he likes.

> This way we do not have to add 3 extra keys to every battery object.

Hmm ... I'm confused what is the big difference between to add 4 normalised 
and 5 reporting keys and the opposite way ?

Cheers,
Danny

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



More information about the Hal mailing list