Fix Units mmol in Automation (internal unit in AAPS is mgdl)
This commit is contained in:
parent
90e2c8f65f
commit
f6ecf8a5df
2 changed files with 3 additions and 3 deletions
|
@ -71,7 +71,7 @@ class ActionCarePortalEvent(injector: HasAndroidInjector) : Action(injector) {
|
|||
if (glucoseStatus != null) {
|
||||
therapyEvent.glucose = glucoseStatus.glucose
|
||||
therapyEvent.glucoseType = TherapyEvent.MeterType.SENSOR
|
||||
valuesWithUnit.add(ValueWithUnit.fromGlucoseUnit(glucoseStatus.glucose, profileFunction.getUnits().asText))
|
||||
valuesWithUnit.add(ValueWithUnit.Mgdl(glucoseStatus.glucose))
|
||||
valuesWithUnit.add(ValueWithUnit.TherapyEventMeterType(TherapyEvent.MeterType.SENSOR))
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -63,8 +63,8 @@ class ActionStartTempTarget(injector: HasAndroidInjector) : Action(injector) {
|
|||
result.updated.forEach { aapsLogger.debug(LTag.DATABASE, "Updated temp target $it") }
|
||||
uel.log(UserEntry.Action.TT, Sources.Automation, title,
|
||||
ValueWithUnit.TherapyEventTTReason(TemporaryTarget.Reason.AUTOMATION),
|
||||
ValueWithUnit.fromGlucoseUnit(tt().lowTarget, value.units.asText),
|
||||
ValueWithUnit.fromGlucoseUnit(tt().highTarget, value.units.asText).takeIf { tt().lowTarget != tt().highTarget },
|
||||
ValueWithUnit.Mgdl(tt().lowTarget),
|
||||
ValueWithUnit.Mgdl(tt().highTarget).takeIf { tt().lowTarget != tt().highTarget },
|
||||
ValueWithUnit.Minute(TimeUnit.MILLISECONDS.toMinutes(tt().duration).toInt()))
|
||||
callback.result(PumpEnactResult(injector).success(true).comment(R.string.ok))?.run()
|
||||
}, {
|
||||
|
|
Loading…
Reference in a new issue