lastBolusTime - only treatments with insulin

This commit is contained in:
AdrianLxM 2018-04-25 11:52:01 +02:00 committed by GitHub
parent 4217e82e0a
commit ac23750942
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,