From b8327f6b3a7dc0bc09db858c677456d17c581630 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 11 Aug 2020 14:32:48 +0200 Subject: [PATCH] fix ABS IOB calculation --- .../androidaps/plugins/treatments/TreatmentsPlugin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 3b49779bd3..bab14b9f66 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 @@ -470,8 +470,8 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface Treatment treatment = new Treatment(getInjector()); treatment.date = i; treatment.insulin = running * 5.0 / 60.0; // 5 min chunk - Iob iob = treatment.iobCalc(i, profile.getDia()); - total.iob += iob.iobContrib; + Iob iob = treatment.iobCalc(time, profile.getDia()); + total.basaliob += iob.iobContrib; total.activity += iob.activityContrib; } return total;