ignore rounding deviations
This commit is contained in:
parent
e0a592f968
commit
11b8b83651
1 changed files with 2 additions and 2 deletions
|
@ -232,8 +232,8 @@ public class ActionStringHandler {
|
|||
0d, percentage, useBolusIOB, useBasalIOB, false, useTrend);
|
||||
|
||||
Double insulinAfterConstraints = MainApp.getConstraintChecker().applyBolusConstraints(new Constraint<>(bolusWizard.calculatedTotalInsulin)).value();
|
||||
if (insulinAfterConstraints - bolusWizard.calculatedTotalInsulin != 0) {
|
||||
sendError("Insulin contraint violation!" +
|
||||
if (Math.abs(insulinAfterConstraints - bolusWizard.calculatedTotalInsulin) >= 0.01) {
|
||||
sendError("Insulin constraint violation!" +
|
||||
"\nCannot deliver " + format.format(bolusWizard.calculatedTotalInsulin) + "!");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue