Round up to be sure.

This commit is contained in:
Johannes Mockenhaupt 2018-04-24 23:07:57 +02:00
parent 60fbb1eeba
commit da96b2d87c
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -414,7 +414,8 @@ public class IobCobCalculatorPlugin extends PluginBase {
if (autosensData != null) { if (autosensData != null) {
displayCob = autosensData.cob; displayCob = autosensData.cob;
for (Treatment treatment : treatments) { for (Treatment treatment : treatments) {
if (IobCobCalculatorPlugin.roundUpTime(treatment.date) > autosensData.time && treatment.date < now && treatment.carbs > 0) { if (IobCobCalculatorPlugin.roundUpTime(treatment.date) > IobCobCalculatorPlugin.roundUpTime(autosensData.time)
&& treatment.date < now && treatment.carbs > 0) {
displayCob += treatment.carbs; displayCob += treatment.carbs;
} }
} }