Fix Calibration value in uel.log
This commit is contained in:
parent
009d428e89
commit
98ef5768be
|
@ -164,11 +164,11 @@ class DexcomPlugin @Inject constructor(
|
||||||
result.calibrationsInserted.forEach { calibration ->
|
result.calibrationsInserted.forEach { calibration ->
|
||||||
calibration.glucose?.let { glucosevalue ->
|
calibration.glucose?.let { glucosevalue ->
|
||||||
uel.log(
|
uel.log(
|
||||||
Action.CAREPORTAL,
|
Action.CALIBRATION,
|
||||||
Sources.Dexcom,
|
Sources.Dexcom,
|
||||||
ValueWithUnit.Timestamp(calibration.timestamp),
|
ValueWithUnit.Timestamp(calibration.timestamp),
|
||||||
ValueWithUnit.TherapyEventType(calibration.type),
|
ValueWithUnit.TherapyEventType(calibration.type),
|
||||||
ValueWithUnit.fromGlucoseUnit(glucosevalue, calibration.glucoseUnit.toString())
|
ValueWithUnit.fromGlucoseUnit(glucosevalue, calibration.glucoseUnit.toString)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
aapsLogger.debug(LTag.DATABASE, "Inserted calibration $calibration")
|
aapsLogger.debug(LTag.DATABASE, "Inserted calibration $calibration")
|
||||||
|
|
|
@ -153,11 +153,11 @@ class GlunovoPlugin @Inject constructor(
|
||||||
savedValues.calibrationsInserted.forEach { calibration ->
|
savedValues.calibrationsInserted.forEach { calibration ->
|
||||||
calibration.glucose?.let { glucosevalue ->
|
calibration.glucose?.let { glucosevalue ->
|
||||||
uel.log(
|
uel.log(
|
||||||
UserEntry.Action.CAREPORTAL,
|
UserEntry.Action.CALIBRATION,
|
||||||
UserEntry.Sources.Dexcom,
|
UserEntry.Sources.Dexcom,
|
||||||
ValueWithUnit.Timestamp(calibration.timestamp),
|
ValueWithUnit.Timestamp(calibration.timestamp),
|
||||||
ValueWithUnit.TherapyEventType(calibration.type),
|
ValueWithUnit.TherapyEventType(calibration.type),
|
||||||
ValueWithUnit.fromGlucoseUnit(glucosevalue, calibration.glucoseUnit.toString())
|
ValueWithUnit.fromGlucoseUnit(glucosevalue, calibration.glucoseUnit.toString)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
aapsLogger.debug(LTag.DATABASE, "Inserted calibration $calibration")
|
aapsLogger.debug(LTag.DATABASE, "Inserted calibration $calibration")
|
||||||
|
|
|
@ -66,9 +66,9 @@ data class TherapyEvent(
|
||||||
previous.interfaceIDs.nightscoutId == null &&
|
previous.interfaceIDs.nightscoutId == null &&
|
||||||
interfaceIDs.nightscoutId != null
|
interfaceIDs.nightscoutId != null
|
||||||
|
|
||||||
enum class GlucoseUnit {
|
enum class GlucoseUnit (val toString: String) {
|
||||||
MGDL,
|
MGDL (ValueWithUnit.MGDL),
|
||||||
MMOL;
|
MMOL (ValueWithUnit.MMOL);
|
||||||
|
|
||||||
companion object
|
companion object
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue