Remove second one finally to be consistent with master 2.8.2
This commit is contained in:
parent
e68d2d080d
commit
9db587269a
|
@ -507,6 +507,11 @@ class ActionStringHandler @Inject constructor(
|
|||
val duration = SafeParse.stringToInt(act[2])
|
||||
var low = SafeParse.stringToDouble(act[3])
|
||||
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)
|
||||
} else if ("wizard2" == act[0]) {
|
||||
if (lastBolusWizard != null) { //use last calculation as confirmed string matches
|
||||
|
@ -571,8 +576,8 @@ class ActionStringHandler @Inject constructor(
|
|||
timestamp = System.currentTimeMillis(),
|
||||
duration = TimeUnit.MINUTES.toMillis(duration.toLong()),
|
||||
reason = TemporaryTarget.Reason.WEAR,
|
||||
lowTarget = Profile.toMgdl(low, profileFunction.getUnits()),
|
||||
highTarget = Profile.toMgdl(high, profileFunction.getUnits())
|
||||
lowTarget = low,
|
||||
highTarget = high
|
||||
)).subscribe({ result ->
|
||||
result.inserted.forEach { aapsLogger.debug(LTag.DATABASE, "Inserted temp target $it") }
|
||||
result.updated.forEach { aapsLogger.debug(LTag.DATABASE, "Updated temp target $it") }
|
||||
|
|
Loading…
Reference in a new issue