Update ranges for centralite battery values

This just updates the range to be more conservative as well as match the
battery curve better.
This commit is contained in:
Zach Varberg
2017-07-14 10:08:44 -05:00
parent 34df40d5b4
commit 97bfe61baa
2 changed files with 3 additions and 3 deletions

View File

@@ -171,8 +171,8 @@ private Map getBatteryResult(rawValue) {
def pct = batteryMap[volts]
result.value = pct
} else {
def minVolts = 2.1
def maxVolts = 3.0
def minVolts = 2.4
def maxVolts = 2.7
def pct = (volts - minVolts) / (maxVolts - minVolts)
def roundedPct = Math.round(pct * 100)
if (roundedPct <= 0)

View File

@@ -274,7 +274,7 @@ private Map getBatteryResult(rawValue) {
result.value = pct
} else {
def minVolts = 2.1
def maxVolts = 3.0
def maxVolts = 2.7
def pct = (volts - minVolts) / (maxVolts - minVolts)
def roundedPct = Math.round(pct * 100)
if (roundedPct <= 0)