HAL battery backend, new thread!

David Zeuthen david at fubar.dk
Mon Aug 1 10:20:02 PDT 2005


On Mon, 2005-08-01 at 16:33 +0100, Richard Hughes wrote:
> David,
> 
> I've attached the latest patch with the C99 fixes you asked for.
> 
> Danny, I've also made the changes you suggested (the
> battery.charge_level.granularity_1 and others)
> 
> I hope you don't mind Ryan if we get this little part in before the
> bigger changes. I'll test your patch out on my machine later, but you'll
> appreciate I only have the one battery!
> 
> I've only included the functional part of the patch, (so we can apply it
> now) and I'll follow this up with a separate patch to the
> hal-spec.xml.in after we have bickered about the wording. :-)
> 
> Possible text for the ChangeLog:
> 
> hald/linux2/acpi.c (battery_refresh_poll, battery_refresh): convert the
> current values from mAh to mWh (some laptops report in other than mWh)
> by multiplying by the current voltage. This gives us "energy" units that
> are not dependent on the current voltage of the battery.
> This fixes the bug (http://bugzilla.gnome.org/show_bug.cgi?id=309944)
> where the remaining time was being worked out with incorrect logic.
> The util_compute_time_remaining and util_compute_percentage_charge
> functions now take the sanitised values too.
> This patch introduces the new keys battery.reporting.* representing the
> raw values from ACPI. This will not change API for existing programs (as
> the old charge_level keys are just re-used for the sanitised values).
> A battery.charge_level.design key of "Unknown ACPI Unit" represents an
> unknown unit that may have to be calculated like mAh.
> 
> Thanks (to all of you),

Looks good - I've committed this and the doc patch. Thanks a lot!

Cheers,
David


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



More information about the Hal mailing list