- Fix for remaining insulin

This commit is contained in:
Andy Rozman 2019-12-08 18:25:58 +00:00
parent 5711a98a77
commit 9b5535edf0

View file

@ -542,9 +542,9 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump
TreatmentsPlugin.getPlugin().addToHistoryTreatment(detailedBolusInfo, true); TreatmentsPlugin.getPlugin().addToHistoryTreatment(detailedBolusInfo, true);
// we subtract insulin, exact amount will be visible with next remainingInsulin update. // we subtract insulin, exact amount will be visible with next remainingInsulin update.
if (getPodPumpStatusObject().reservoirRemainingUnits != 0) { // if (getPodPumpStatusObject().reservoirRemainingUnits != 0) {
getPodPumpStatusObject().reservoirRemainingUnits -= detailedBolusInfo.insulin; // getPodPumpStatusObject().reservoirRemainingUnits -= detailedBolusInfo.insulin;
} // }
incrementStatistics(detailedBolusInfo.isSMB ? OmnipodConst.Statistics.SMBBoluses incrementStatistics(detailedBolusInfo.isSMB ? OmnipodConst.Statistics.SMBBoluses
: OmnipodConst.Statistics.StandardBoluses); : OmnipodConst.Statistics.StandardBoluses);