diff --git a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt index 843ebf7df8..d3cb52acf0 100644 --- a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt +++ b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt @@ -611,6 +611,8 @@ class MedtronicHistoryData @Inject constructor( if (processList.isNotEmpty()) { for (tempBasalProcessDTO in processList) { + aapsLogger.debug(LTag.PUMP, "DD: tempBasalProcessDTO.itemOne: " + gson.toJson(tempBasalProcessDTO.itemOne)) + val entryWithTempId = findDbEntry(tempBasalProcessDTO.itemOne, tbrRecords) aapsLogger.debug(LTag.PUMP, "DD: entryWithTempId: " + (if (entryWithTempId == null) "null" else entryWithTempId.toString())) @@ -624,6 +626,18 @@ class MedtronicHistoryData @Inject constructor( aapsLogger.debug(LTag.PUMP, String.format("DD: tempIdEntry=%s, tbrEntry=%s, tempBasalProcessDTO=%s, pumpType=%s, serial=%s", gson.toJson(entryWithTempId), gson.toJson(tbrEntry), gson.toJson(tempBasalProcessDTO), medtronicPumpStatus.pumpType, medtronicPumpStatus.serialNumber)) + aapsLogger.debug(LTag.PUMP, String.format(Locale.ENGLISH, "BEFORE syncTemporaryBasalWithTempId " + + "[date=%d, dateProcess=%d, tbrEntry.insulinRate=%d, duration=%d, isAbsolute=%b, temporaryId=%d, pumpId=%d, pumpType=%s, pumpSerial=%s]", + tempBasalProcessDTO.atechDateTime, + tryToGetByLocalTime(tempBasalProcessDTO.atechDateTime), + tbrEntry.insulinRate, + tempBasalProcessDTO.duration * 60L * 1000L, + !tbrEntry.isPercent, + entryWithTempId.temporaryId, + tempBasalProcessDTO.pumpId, + medtronicPumpStatus.pumpType, + medtronicPumpStatus.serialNumber)) + val result = pumpSync.syncTemporaryBasalWithTempId( tryToGetByLocalTime(tempBasalProcessDTO.atechDateTime), tbrEntry.insulinRate,