fix ABS IOB calculation

This commit is contained in:
Milos Kozak 2020-08-11 14:32:48 +02:00
parent 272f91d90b
commit b8327f6b3a

View file

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