- 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);
// we subtract insulin, exact amount will be visible with next remainingInsulin update.
if (getPodPumpStatusObject().reservoirRemainingUnits != 0) {
getPodPumpStatusObject().reservoirRemainingUnits -= detailedBolusInfo.insulin;
}
// if (getPodPumpStatusObject().reservoirRemainingUnits != 0) {
// getPodPumpStatusObject().reservoirRemainingUnits -= detailedBolusInfo.insulin;
// }
incrementStatistics(detailedBolusInfo.isSMB ? OmnipodConst.Statistics.SMBBoluses
: OmnipodConst.Statistics.StandardBoluses);