Remove second one finally to be consistent with master 2.8.2

This commit is contained in:
Philoul 2021-10-18 20:17:52 +02:00
parent e68d2d080d
commit 9db587269a

View file

@ -507,6 +507,11 @@ class ActionStringHandler @Inject constructor(
val duration = SafeParse.stringToInt(act[2]) val duration = SafeParse.stringToInt(act[2])
var low = SafeParse.stringToDouble(act[3]) var low = SafeParse.stringToDouble(act[3])
var high = SafeParse.stringToDouble(act[4]) var high = SafeParse.stringToDouble(act[4])
val isMGDL = java.lang.Boolean.parseBoolean(act[1])
if (!isMGDL) {
low *= Constants.MMOLL_TO_MGDL
high *= Constants.MMOLL_TO_MGDL
}
generateTempTarget(duration, low, high) generateTempTarget(duration, low, high)
} else if ("wizard2" == act[0]) { } else if ("wizard2" == act[0]) {
if (lastBolusWizard != null) { //use last calculation as confirmed string matches if (lastBolusWizard != null) { //use last calculation as confirmed string matches
@ -571,8 +576,8 @@ class ActionStringHandler @Inject constructor(
timestamp = System.currentTimeMillis(), timestamp = System.currentTimeMillis(),
duration = TimeUnit.MINUTES.toMillis(duration.toLong()), duration = TimeUnit.MINUTES.toMillis(duration.toLong()),
reason = TemporaryTarget.Reason.WEAR, reason = TemporaryTarget.Reason.WEAR,
lowTarget = Profile.toMgdl(low, profileFunction.getUnits()), lowTarget = low,
highTarget = Profile.toMgdl(high, profileFunction.getUnits()) highTarget = high
)).subscribe({ result -> )).subscribe({ result ->
result.inserted.forEach { aapsLogger.debug(LTag.DATABASE, "Inserted temp target $it") } result.inserted.forEach { aapsLogger.debug(LTag.DATABASE, "Inserted temp target $it") }
result.updated.forEach { aapsLogger.debug(LTag.DATABASE, "Updated temp target $it") } result.updated.forEach { aapsLogger.debug(LTag.DATABASE, "Updated temp target $it") }