Bolus wizard: use PumpDescription to round final bolus to a value compatible with the pump.

This commit is contained in:
Johannes Mockenhaupt 2017-07-14 16:45:31 +02:00
parent 0e6a93df90
commit 80124e6d7b
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -110,7 +110,8 @@ public class BolusWizard {
calculatedTotalInsulin = 0d;
}
calculatedTotalInsulin = Round.roundTo(calculatedTotalInsulin, 0.05d);
double bolusStep = MainApp.getConfigBuilder().getPumpDescription().bolusStep;
calculatedTotalInsulin = Round.roundTo(calculatedTotalInsulin, bolusStep);
return calculatedTotalInsulin;
}