[patch] pmu patch
Richard Hughes
ee21rh at surrey.ac.uk
Thu Feb 3 08:47:53 PST 2005
Sjoerd Simons <sjoerd <at> luon.net> writes:
> > I changed the spec and code to only have battery.charge_level.maximum.
>
> Any decision about the unit ?
We coul just standardise to percent... lowest common denominator and all that.
We could just do value = ( present / maximum ) * 100 for a percentage reading
for any type of unit. Makes the information a little easier to digest for
applets too.
> Maybe. The other side is that calculating remaining time is something that is
> dependant on hardware. So by pushing it to a higher level you require all apps
> to know how to calculate it for certain types of hardware. Imho if the lowlevel
> stuff that knows the hardware quite well already does it for you, then use
> that..
Surely we can look at the source for battstat - that seem to get the information
most right for me (except for APM that is....)
The thing is, APM hasn't really got a clue. I'm sure there is a random number
generator in the code somewhere.
> No reason to not do something because it requires fixing hal right ? Battery
> and sensor informations are some the things i would really love to have in hal
> 0.6.x.. Because it makes writing nice highlevel apps for them so much easier.
Yes, I second this. A whole suite of apps that rely on the information and
infrastructure of HAL. One common place for powermanagement changes, not the
hodge-podge we have now.
> Sensors are a little diffent from batteries ofcourse. Most of them do actually
> give out units. But ofcourse it could be that a sensors gives out just
> percentage, so if we only get that and don't have extra knowledge then that's
> what the user app sees.
Again, my vote's on percentage.
Richard.
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list