From ac237509427fd87fa8a1fcab18bb1d64019d5c17 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Wed, 25 Apr 2018 11:52:01 +0200 Subject: [PATCH] lastBolusTime - only treatments with insulin --- .../androidaps/plugins/Treatments/TreatmentsPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/TreatmentsPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/TreatmentsPlugin.java index 209fee9c57..e50c88456c 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/TreatmentsPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/TreatmentsPlugin.java @@ -175,7 +175,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface Iob tIOB = t.iobCalc(time, dia); total.iob += tIOB.iobContrib; total.activity += tIOB.activityContrib; - if (t.date > total.lastBolusTime) + if (t.insulin > 0 && t.date > total.lastBolusTime) total.lastBolusTime = t.date; if (!t.isSMB) { // instead of dividing the DIA that only worked on the bilinear curves,