fix TT units logging in automation
This commit is contained in:
parent
c419c1f1e4
commit
c684f12aa7
1 changed files with 2 additions and 2 deletions
|
@ -63,8 +63,8 @@ class ActionStartTempTarget(injector: HasAndroidInjector) : Action(injector) {
|
||||||
result.updated.forEach { aapsLogger.debug(LTag.DATABASE, "Updated temp target $it") }
|
result.updated.forEach { aapsLogger.debug(LTag.DATABASE, "Updated temp target $it") }
|
||||||
uel.log(UserEntry.Action.TT, Sources.Automation, title,
|
uel.log(UserEntry.Action.TT, Sources.Automation, title,
|
||||||
ValueWithUnit.TherapyEventTTReason(TemporaryTarget.Reason.AUTOMATION),
|
ValueWithUnit.TherapyEventTTReason(TemporaryTarget.Reason.AUTOMATION),
|
||||||
ValueWithUnit.fromGlucoseUnit(tt().lowTarget, Constants.MGDL),
|
ValueWithUnit.fromGlucoseUnit(tt().lowTarget, value.units.asText),
|
||||||
ValueWithUnit.fromGlucoseUnit(tt().highTarget, Constants.MGDL).takeIf { tt().lowTarget != tt().highTarget },
|
ValueWithUnit.fromGlucoseUnit(tt().highTarget, value.units.asText).takeIf { tt().lowTarget != tt().highTarget },
|
||||||
ValueWithUnit.Minute(TimeUnit.MILLISECONDS.toMinutes(tt().duration).toInt()))
|
ValueWithUnit.Minute(TimeUnit.MILLISECONDS.toMinutes(tt().duration).toInt()))
|
||||||
callback.result(PumpEnactResult(injector).success(true).comment(R.string.ok))?.run()
|
callback.result(PumpEnactResult(injector).success(true).comment(R.string.ok))?.run()
|
||||||
}, {
|
}, {
|
||||||
|
|
Loading…
Reference in a new issue