existing map is to seventeen

This commit is contained in:
Philoul 2020-07-10 15:29:19 +02:00
parent 34f78b4f8c
commit de8b63ac4d

View file

@ -34,7 +34,7 @@ class DefaultProfile @Inject constructor(val injector: HasAndroidInjector) {
profile.put("carbratio", singleValueArray(ic, arrayOf(0.0, -3.0, 0.0, -1.0, -3.0, 0.0, -2.0))) profile.put("carbratio", singleValueArray(ic, arrayOf(0.0, -3.0, 0.0, -1.0, -3.0, 0.0, -2.0)))
val isf = Round.roundTo(170.0 / _tdd, 0.1) val isf = Round.roundTo(170.0 / _tdd, 0.1)
profile.put("sens", singleValueArray(isf, arrayOf(0.0, -1.0, -0.0, -0.0, -1.0, 0.0, -1.0))) profile.put("sens", singleValueArray(isf, arrayOf(0.0, -1.0, -0.0, -0.0, -1.0, 0.0, -1.0)))
} else if (age >= 12 && age < 17) { } else if (age >= 12 && age < 18) {
val _tdd = if (tdd == 0.0) 1.0 * weight else tdd val _tdd = if (tdd == 0.0) 1.0 * weight else tdd
closest(twelveToSeventeen, _tdd * 0.5)?.let { array -> profile.put("basal", arrayToJson(array)) } closest(twelveToSeventeen, _tdd * 0.5)?.let { array -> profile.put("basal", arrayToJson(array)) }
val ic = Round.roundTo(500.0 / _tdd, 1.0) val ic = Round.roundTo(500.0 / _tdd, 1.0)