From 8bdc86f359ec2ded6b37892773dfd4c9af23f007 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Mon, 7 Nov 2016 15:17:16 +0100 Subject: [PATCH 1/2] Calculate activityContrib for TempBasal --- app/src/main/java/info/nightscout/androidaps/db/TempBasal.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/info/nightscout/androidaps/db/TempBasal.java b/app/src/main/java/info/nightscout/androidaps/db/TempBasal.java index 2d3a781a3a..e1d7af8662 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/TempBasal.java +++ b/app/src/main/java/info/nightscout/androidaps/db/TempBasal.java @@ -97,6 +97,7 @@ public class TempBasal { Iob aIOB = tempBolusPart.iobCalc(time, profile.getDia()); result.basaliob += aIOB.iobContrib; + result.activity += aIOB.activityContrib; Double dia_ago = time.getTime() - profile.getDia() * 60 * 60 * 1000; if (date > dia_ago && date <= time.getTime()) { result.netbasalinsulin += tempBolusPart.insulin; From 93accc0d9f6d839376edcfd800a2c0b537ada14d Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Mon, 7 Nov 2016 15:18:48 +0100 Subject: [PATCH 2/2] Add in basalIOB.activity --- .../info/nightscout/androidaps/plugins/OpenAPSMA/IobTotal.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/IobTotal.java b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/IobTotal.java index b40c2db602..edd6504219 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/IobTotal.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/IobTotal.java @@ -43,7 +43,7 @@ public class IobTotal { public static IobTotal combine(IobTotal bolusIOB, IobTotal basalIob) { IobTotal result = new IobTotal(); result.iob = bolusIOB.iob + basalIob.basaliob; - result.activity = bolusIOB.activity; + result.activity = bolusIOB.activity + basalIob.activity; result.bolussnooze = bolusIOB.bolussnooze; result.basaliob = basalIob.basaliob; result.netbasalinsulin = basalIob.netbasalinsulin;