mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
snow: make pmu charge ranges inclusive
Since we work with integral values for battery temperature, lower limits need to be inclusive when determining when to enable/disable charging. Signed-off-by: David Hendricks <dhendrix@chromium.org> BRANCH=snow BUG=none TEST=none (yet...) Change-Id: Icfc52066ca469b56ebc411bad864111848eab197 Reviewed-on: https://gerrit.chromium.org/gerrit/32652 Reviewed-by: Rong Chang <rongchang@chromium.org> Commit-Ready: David Hendricks <dhendrix@chromium.org> Tested-by: David Hendricks <dhendrix@chromium.org>
This commit is contained in:
@@ -76,13 +76,13 @@ static int battery_temperature_celsius(int t)
|
||||
static int battery_start_charging_range(int t)
|
||||
{
|
||||
t = battery_temperature_celsius(t);
|
||||
return (t > 5 && t < 45);
|
||||
return (t >= 5 && t < 45);
|
||||
}
|
||||
|
||||
static int battery_charging_range(int t)
|
||||
{
|
||||
t = battery_temperature_celsius(t);
|
||||
return (t > 5 && t < 60);
|
||||
return (t >= 5 && t < 60);
|
||||
}
|
||||
|
||||
static int battery_discharging_range(int t)
|
||||
|
||||
Reference in New Issue
Block a user