From 275644a1b88e132ea8e168201f6e06d76c696f24 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 31 Jan 2013 12:24:14 +0100 Subject: [PATCH] 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 --- src/linux/up-device-supply.c | 4 ++-- 1 file 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,