summaryrefslogtreecommitdiff
path: root/src/linux/up-device-supply.c
diff options
context:
space:
mode:
authorMartin Pitt <martinpitt@gnome.org>2013-01-31 12:24:14 +0100
committerMartin Pitt <martinpitt@gnome.org>2013-01-31 12:24:14 +0100
commit275644a1b88e132ea8e168201f6e06d76c696f24 (patch)
tree5eb5b3cb2c89d8d52248338b3fdd869e498c55e1 /src/linux/up-device-supply.c
parent66f8f80023f742a206e6a8cb064d1ea29bca4fcc (diff)
linux: Bump maximum accepted "time to empty" to 10 days
In the days of low-power ARM devices and large laptop batteries, imposing a 20 hour plausibility limit on "time to full" is not appropriate any more. Bump it to 240 hours to still keep a plausibility check against "factor 1000" errors. https://bugs.freedesktop.org/show_bug.cgi?id=60110
Diffstat (limited to 'src/linux/up-device-supply.c')
-rw-r--r--src/linux/up-device-supply.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c
index 9dca444..bd54801 100644
--- a/src/linux/up-device-supply.c
+++ b/src/linux/up-device-supply.c
@@ -782,9 +782,9 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply)
/* check the remaining time is under a set limit, to deal with broken
primary batteries rate */
- if (time_to_empty > (20 * 60 * 60))
+ if (time_to_empty > (240 * 60 * 60)) /* ten days for discharging */
time_to_empty = 0;
- if (time_to_full > (20 * 60 * 60))
+ if (time_to_full > (20 * 60 * 60)) /* 20 hours for charging */
time_to_full = 0;
/* check if the energy value has changed and, if that's the case,