Implemented feedback

This commit is contained in:
harisp 2018-07-11 18:17:09 +02:00
parent b42ce70daa
commit 395f2313fd

View file

@ -914,6 +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);
if(insulin.value() != 0)
insulin.setIfGreater(statusResult.minimumBolusAmount, String.format(MainApp.gs(R.string.limitingbolus), statusResult.maximumBolusAmount, MainApp.gs(R.string.pumplimit)), this);
}
return insulin;
}