Refractor to use new function

This commit is contained in:
Tim Gunn 2020-05-31 16:43:32 +12:00
parent 8aabf15dfe
commit f69c11af40
No known key found for this signature in database
GPG key ID: C9BC1E9D0D0AED8C

View file

@ -722,14 +722,6 @@ public class IobCobCalculatorPlugin extends PluginBase implements IobCobCalculat
result.boluses += treatment.insulin; 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()"); AutosensData autosensData = getLastAutosensDataSynchronized("getMealData()");
@ -739,6 +731,7 @@ public class IobCobCalculatorPlugin extends PluginBase implements IobCobCalculat
result.slopeFromMaxDeviation = autosensData.slopeFromMaxDeviation; result.slopeFromMaxDeviation = autosensData.slopeFromMaxDeviation;
result.usedMinCarbsImpact = autosensData.usedMinCarbsImpact; result.usedMinCarbsImpact = autosensData.usedMinCarbsImpact;
} }
result.lastCarbTime = treatmentsPlugin.getLastCarbTime();
result.lastBolusTime = treatmentsPlugin.getLastBolusTime(); result.lastBolusTime = treatmentsPlugin.getLastBolusTime();
return result; return result;
} }