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 6f17edbe0c..09ebc9d5b7 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 @@ -358,7 +358,7 @@ class MedtronicHistoryData @Inject constructor( aapsLogger.debug(LTag.PUMP, String.format(Locale.ENGLISH, "ProcessHistoryData: TBRs Processed [count=%d, items=%s]", tbrs.size, gson.toJson(tbrs))) if (tbrs.isNotEmpty()) { try { - processTBREntries(tbrs, rewindRecords) + processTBREntries(tbrs) } catch (ex: Exception) { aapsLogger.error(LTag.PUMP, "ProcessHistoryData: Error processing TBR entries: " + ex.message, ex) throw ex @@ -583,7 +583,7 @@ class MedtronicHistoryData @Inject constructor( } } - private fun processTBREntries(entryList: MutableList, rewindList: MutableList) { + private fun processTBREntries(entryList: MutableList) { entryList.reverse() val tbr = entryList[0].getDecodedDataEntry("Object") as TempBasalPair // var readOldItem = false @@ -607,7 +607,7 @@ class MedtronicHistoryData @Inject constructor( val tbrRecords = pumpSyncStorage.getTBRs() - val processList: MutableList = createTBRProcessList(entryList, rewindList) + val processList: MutableList = createTBRProcessList(entryList) if (processList.isNotEmpty()) { for (tempBasalProcessDTO in processList) { @@ -731,7 +731,7 @@ class MedtronicHistoryData @Inject constructor( } - fun createTBRProcessList(entryList: MutableList, rewindList: MutableList) : MutableList { + fun createTBRProcessList(entryList: MutableList) : MutableList { aapsLogger.debug(LTag.PUMP, "${ProcessHistoryRecord.TBR.description} List (before filter): ${gson.toJson(entryList)}")