Feature requests for hal battery backend.

Sergey Udaltsov sergey.udaltsov at gmail.com
Sat Jul 30 11:23:17 PDT 2005


> > unit = hal_device_property_get_string (d, "battery.charge_level.unit");
...
> > if (strcmp (unit, "mWh") == 0) {
...
> > } else if (strcmp (unit, "mAh") == 0) {
...
> > }
Shouldn't we introduce "unit.type"? Possible values "energy" and
"current" (bad names, I know  - but anyway, some enumeration). If some
odd battery would report the charge in joules, the code above won't
work.

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



More information about the Hal mailing list