- added some additional logs for situation that is problem

This commit is contained in:
Andy Rozman 2021-06-06 15:22:55 +01:00
parent 13245df279
commit cd8f486dc0

View file

@ -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,