Merge pull request #1209 from harispoljo/CorrInsight

Fixed problem with Corr numberpicker when using Insightpump
This commit is contained in:
Milos Kozak 2018-07-12 16:10:10 +03:00 committed by GitHub
commit e8c1dd5e3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -914,7 +914,9 @@ public class InsightPlugin extends PluginBase implements PumpInterface, Constrai
public Constraint<Double> applyBolusConstraints(Constraint<Double> insulin) {
if (statusResult != null) {
insulin.setIfSmaller(statusResult.maximumBolusAmount, String.format(MainApp.gs(R.string.limitingbolus), statusResult.maximumBolusAmount, MainApp.gs(R.string.pumplimit)), this);
insulin.setIfGreater(statusResult.minimumBolusAmount, String.format(MainApp.gs(R.string.limitingbolus), statusResult.maximumBolusAmount, MainApp.gs(R.string.pumplimit)), this);
if(insulin.value() < 0 && insulin.value() > 0.04 )
insulin.setIfGreater(statusResult.minimumBolusAmount, String.format(MainApp.gs(R.string.limitingbolus), statusResult.maximumBolusAmount, MainApp.gs(R.string.pumplimit)), this);
}
return insulin;
}