hal: Branch 'master'
Danny Kukawka
dkukawka at kemper.freedesktop.org
Tue Jan 29 14:38:22 PST 2008
hald/linux/device.c | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 0c4ecf172cc80cc036b14873cdd94c9d9bce3c09
Author: Danny Kukawka <danny.kukawka at web.de>
Date: Tue Jan 29 23:38:16 2008 +0100
get battery.voltage.design on ACPI power_supply batteries
Applied adopted version of a patch from Sjoerd Simons <sjoerd at luon.net>
git repo. Get battery.voltage.design for ACPI power_supply batteries
from voltage_min_design.
> According to Alexey Starikovskiy:
> On most new batteries design voltage is less than current voltage,
> thus I've chosen VOLTAGE_MIN_DESIGN. On older batteries, current
> voltage may become lower than design, so I think hal should not be
> very strict about how they relate to each other.
diff --git a/hald/linux/device.c b/hald/linux/device.c
index 23ab347..1211ee2 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -3202,6 +3202,9 @@ refresh_battery_slow (HalDevice *d)
if (hal_util_get_int_from_file (path, "voltage_max_design", &voltage_design, 10)) {
hal_device_property_set_int (d, "battery.voltage.design", voltage_design / 1000);
hal_device_property_set_string (d, "battery.voltage.unit", "mV");
+ } else if (hal_util_get_int_from_file (path, "voltage_min_design", &voltage_design, 10)) {
+ hal_device_property_set_int (d, "battery.voltage.design", voltage_design / 1000);
+ hal_device_property_set_string (d, "battery.voltage.unit", "mV");
}
/* try to get the design info and set the units */
More information about the hal-commit
mailing list