From 654b8ab0f68247dede7750bb7e4a114c5e8ba9b2 Mon Sep 17 00:00:00 2001 From: Andy Rozman Date: Tue, 18 Jun 2019 21:37:21 +0100 Subject: [PATCH] 0.11.1-SNAPSHOT - fix to suspend code --- app/build.gradle | 2 +- .../plugins/pump/medtronic/data/MedtronicHistoryData.java | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c50b1ea0b4..e8dbcc0b6a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -105,7 +105,7 @@ android { multiDexEnabled true versionCode 1500 // dev_version: 2.3.1-dev - version "medtronic-0.11.0-SNAPSHOT" + version "medtronic-0.11.1-SNAPSHOT" buildConfigField "String", "VERSION", '"' + version + '"' buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"' buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"' diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.java index 6fb8c274d2..25e6eeaebe 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.java @@ -869,7 +869,7 @@ public class MedtronicHistoryData { PumpHistoryEntry oneMoreEntryFromHistory = getOneMoreEntryFromHistory(); if (oneMoreEntryFromHistory != null) { - filteredItems.add(getOneMoreEntryFromHistory()); + filteredItems.add(oneMoreEntryFromHistory); } else { filteredItems.remove(filteredItems.size() - 1); // remove last (unpaired R) } @@ -933,6 +933,7 @@ public class MedtronicHistoryData { if (filteredItem.getEntryType() == PumpHistoryEntryType.Bolus || filteredItem.getEntryType() == PumpHistoryEntryType.TempBasalCombined) { finishedItems = true; + break; } if (!finishedItems) { @@ -956,6 +957,7 @@ public class MedtronicHistoryData { if (filteredItem.getEntryType() == PumpHistoryEntryType.Bolus || filteredItem.getEntryType() == PumpHistoryEntryType.TempBasalCombined) { finishedItems = true; + break; } if (!finishedItems) { @@ -965,8 +967,10 @@ public class MedtronicHistoryData { } - if (!finishedItems) + if (!finishedItems) { + showLogs("NoDeliveryRewindPrimeRecords: Not finished Items: ", gson.toJson(tempData)); return outList; + } showLogs("NoDeliveryRewindPrimeRecords: Records to evaluate: ", gson.toJson(tempData));