revert change

This commit is contained in:
Tim Gunn 2020-06-01 12:14:45 +12:00
parent 8fefa0b5aa
commit ec188f1329
No known key found for this signature in database
GPG key ID: C9BC1E9D0D0AED8C

View file

@ -722,6 +722,13 @@ public class IobCobCalculatorPlugin extends PluginBase implements IobCobCalculat
result.boluses += treatment.insulin;
}
}
if (t > absorptionTime_ago && t <= now) {
if (treatment.carbs >= 1) {
result.carbs += treatment.carbs;
if (t > result.lastCarbTime)
result.lastCarbTime = t;
}
}
}
AutosensData autosensData = getLastAutosensDataSynchronized("getMealData()");
@ -731,7 +738,6 @@ public class IobCobCalculatorPlugin extends PluginBase implements IobCobCalculat
result.slopeFromMaxDeviation = autosensData.slopeFromMaxDeviation;
result.usedMinCarbsImpact = autosensData.usedMinCarbsImpact;
}
result.lastCarbTime = treatmentsPlugin.getLastCarbTime();
result.lastBolusTime = treatmentsPlugin.getLastBolusTime();
return result;
}