Fix Calibration value in uel.log

This commit is contained in:
Philoul 2021-11-30 20:24:54 +01:00
parent 009d428e89
commit 98ef5768be
3 changed files with 7 additions and 7 deletions

View file

@ -164,11 +164,11 @@ class DexcomPlugin @Inject constructor(
result.calibrationsInserted.forEach { calibration ->
calibration.glucose?.let { glucosevalue ->
uel.log(
Action.CAREPORTAL,
Action.CALIBRATION,
Sources.Dexcom,
ValueWithUnit.Timestamp(calibration.timestamp),
ValueWithUnit.TherapyEventType(calibration.type),
ValueWithUnit.fromGlucoseUnit(glucosevalue, calibration.glucoseUnit.toString())
ValueWithUnit.fromGlucoseUnit(glucosevalue, calibration.glucoseUnit.toString)
)
}
aapsLogger.debug(LTag.DATABASE, "Inserted calibration $calibration")

View file

@ -153,11 +153,11 @@ class GlunovoPlugin @Inject constructor(
savedValues.calibrationsInserted.forEach { calibration ->
calibration.glucose?.let { glucosevalue ->
uel.log(
UserEntry.Action.CAREPORTAL,
UserEntry.Action.CALIBRATION,
UserEntry.Sources.Dexcom,
ValueWithUnit.Timestamp(calibration.timestamp),
ValueWithUnit.TherapyEventType(calibration.type),
ValueWithUnit.fromGlucoseUnit(glucosevalue, calibration.glucoseUnit.toString())
ValueWithUnit.fromGlucoseUnit(glucosevalue, calibration.glucoseUnit.toString)
)
}
aapsLogger.debug(LTag.DATABASE, "Inserted calibration $calibration")

View file

@ -66,9 +66,9 @@ data class TherapyEvent(
previous.interfaceIDs.nightscoutId == null &&
interfaceIDs.nightscoutId != null
enum class GlucoseUnit {
MGDL,
MMOL;
enum class GlucoseUnit (val toString: String) {
MGDL (ValueWithUnit.MGDL),
MMOL (ValueWithUnit.MMOL);
companion object
}