Rate guessing code
Richard Hughes
hughsient at gmail.com
Wed Nov 9 10:08:03 PST 2005
On Wed, 2005-11-09 at 18:59 +0100, Danny Kukawka wrote:
> On Saturday 05 November 2005 19:34, Danny Kukawka wrote:
> > This is not the right way. The time with the methode for broken bios
> > without current rate is over a timeintervall. The current rate from a
> > correct working bios is in the most cases for the _actuall_ current rate,
> > not over a time intervall. You can't say which one is 'more' correct.
> >
> > If the bios support current rate calculate with them and not with the other
> > over a (unknown) time intervall averaged value.
>
> I wrote a patch as compromise. I added a new parameter to
> util_compute_time_remaining() to enable/disable guess the chargeRate. For
> this I added a new property (battery.remaining_time.guess=true/false) to the
> pmu and acpi code. Now it would be easy to enable guess chargeRate for broken
> machines with a fdi-file.
First, thanks for this, when this gets in HAL, I can make at least two
people very happy :-)
Not a big issue for me, by why can't battery.remaining_time.guess be
read in util_compute_time_remaining, or cached there? Seems overkill to
add a new parameter to the function.
Also is "battery.remaining_time.guess" the best keyname? What about:
battery.remaining_time.calculate_internal
or
battery.remaining_time.calculate_per_time
As we aren't really "guessing" but working out the change over a time
period.
Otherwise, patch looks good.
Richard.
More information about the hal
mailing list