bug to fix mAh -> uWh
Richard Hughes
hughsient at gmail.com
Sat Aug 19 11:01:06 PDT 2006
On Sat, 2006-07-29 at 19:09 +0100, Richard Hughes wrote:
> I'm getting more and more people falling for the mAh to uWh bug in HAL
> which manifests itself in many odd ways:
>
> http://bugzilla.gnome.org/show_bug.cgi?id=348234
> http://bugzilla.gnome.org/show_bug.cgi?id=348998
> http://bugzilla.gnome.org/show_bug.cgi?id=338281
>
> Basically, for those not following all the gory details, acpi sends the
> rate normally in mWh or sometimes mAh.
>
> We can convert the mAh reading (battery.reporting.rate) into mWh
> (battery.charge_level.rate) by multiplying it by the voltage (in Volts),
> but in current HAL cvs we are multiplying it by the voltage in mV, and
> so the rate information is a factor of 3 too large. This *really* breaks
> calculating the time for multibattery laptops, and doing snazzy things
> like that.
>
> Note, we can't always convert into mWh for stuff like UPS (so it's not a
> standard unit as far as HAL is concerned) but at the moment we are
> advertising that we have converted it into mWh and in fact we have
> converted it into uWh.
>
> The attached patch has been tested to fix the various issues by no fewer
> than 7 people, either on IRC or in person (just at GUADEC this fixed two
> people's laptops that I bumped into).
>
> The patch has also been unconditionally compiled into my utopia RPMs for
> the last couple of months and I've had no complaints.
>
> Good to commit?
Ping?
Thanks,
Richard.
More information about the hal
mailing list