Feature requests for hal battery backend.

Sergey Udaltsov sergey.udaltsov at gmail.com
Sat Jul 30 13:56:31 PDT 2005


> Watts   = Voltage x Current (per unit)
> mWh     = Voltage x mAh (per time)
> 
> Couldn't you infer that unit == unit_type?
Nope, I thought you wanted to have same type (_energy_, mWh) in the
left part of the equation. Don't you?

So, if it is "energy" which you have from the battery - you just put
it as is (just duplicating the unit). In this case. I would not bind
the property to "mwh", I would not call it
battery.mwh.current - I would call it "battery.energy.current" - and
add the property "battery.energy.unit" as a copy of
"battery.charge_level.unit". Why do you want to bind the code to mwh
(strictly speaking, it is non-system unit, let's be SIstematic and use
mJ)? http://www.ex.ac.uk/cimt/dictunit/dictunit.htm

If the rate is "Current*time" - then you have to get the voltage and
multiply. In this case, well, the logic of getting
"battery.energy.unit" becomes tricky. And probably should be
hardcoded...

Do I overengineer things?

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



More information about the Hal mailing list