[Pkg-wmaker-commits] [wmbattery] 102/241: * Only check to see if a battery is charging if hal reports there is AC power. This is perhaps not 100% correct in systems with multiple batteries that may cross-charge when off AC, but it's faster and it avoids bugs in hal (#463740).
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 24 23:37:41 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmbattery.
commit b04042ae0bd85abe5d2926fe7f6deacf5204b238
Author: Joey Hess <joey at kodama.kitenet.net>
Date: Sat Feb 2 16:45:03 2008 -0500
* Only check to see if a battery is charging if hal reports there is AC
power. This is perhaps not 100% correct in systems with multiple batteries
that may cross-charge when off AC, but it's faster and it avoids bugs in
hal (#463740).
---
debian/changelog | 4 ++++
simplehal.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 1ca86ec..938669b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,10 @@
wmbattery (2.35) UNRELEASED; urgency=low
* Don't spew error messages if optional hal properties are not available.
+ * Only check to see if a battery is charging if hal reports there is AC
+ power. This is perhaps not 100% correct in systems with multiple batteries
+ that may cross-charge when off AC, but it's faster and it avoids bugs in
+ hal (#463740).
-- Joey Hess <joeyh at debian.org> Sat, 02 Feb 2008 16:23:24 -0500
diff --git a/simplehal.c b/simplehal.c
index 632cea9..e42ca46 100644
--- a/simplehal.c
+++ b/simplehal.c
@@ -163,7 +163,8 @@ int simplehal_read (int battery, apm_info *info) {
info->battery_status = BATTERY_STATUS_LOW;
}
}
- else if (get_hal_bool(device, "battery.rechargeable.is_charging", 0) == 1) {
+ else if (info->ac_line_status &&
+ get_hal_bool(device, "battery.rechargeable.is_charging", 0) == 1) {
info->battery_status = BATTERY_STATUS_CHARGING;
info->battery_flags = info->battery_flags | BATTERY_FLAGS_CHARGING;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbattery.git
More information about the Pkg-wmaker-commits
mailing list