Merge branch 'smb-iobfix' into 'smb'

Smb iobfix

See merge request MilosKozak/AndroidAPS!366
This commit is contained in:
AdrianLxM 2017-10-24 06:17:52 +00:00
commit afd5b521ee
2 changed files with 7 additions and 4 deletions

View file

@ -64,9 +64,9 @@ public class IobTotal {
result.iob = bolusIOB.iob + basalIob.basaliob;
result.activity = bolusIOB.activity + basalIob.activity;
result.bolussnooze = bolusIOB.bolussnooze;
result.basaliob = basalIob.basaliob;
result.netbasalinsulin = basalIob.netbasalinsulin;
result.hightempinsulin = basalIob.hightempinsulin;
result.basaliob = bolusIOB.basaliob + basalIob.basaliob;
result.netbasalinsulin = bolusIOB.netbasalinsulin + basalIob.netbasalinsulin;
result.hightempinsulin = basalIob.hightempinsulin + bolusIOB.hightempinsulin;
result.microBolusInsulin = bolusIOB.microBolusInsulin + basalIob.microBolusInsulin;
result.microBolusIOB = bolusIOB.microBolusIOB + basalIob.microBolusIOB;
result.lastBolusTime = bolusIOB.lastBolusTime;

View file

@ -202,8 +202,11 @@ public class TreatmentsPlugin implements PluginBase, TreatmentsInterface {
} else {
if (t.date > total.lastBolusTime)
total.lastBolusTime = t.date;
total.basaliob += t.insulin;
total.basaliob += tIOB.iobContrib;
total.microBolusIOB += tIOB.iobContrib;
total.hightempinsulin += t.insulin;
total.netbasalinsulin += t.insulin;
total.microBolusInsulin += t.insulin;
}
}