Only check reservoir level before bolus if data is available.

This commit is contained in:
Johannes Mockenhaupt 2018-01-28 19:04:46 +01:00
parent bd87a893c2
commit 3b7045227e
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -509,7 +509,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
.comment(MainApp.gs(R.string.combo_error_no_bolus_delivered));
}
if (stateResult.reservoirLevel - 0.5 < detailedBolusInfo.insulin) {
if (stateResult.reservoirLevel != -1 && stateResult.reservoirLevel - 0.5 < detailedBolusInfo.insulin) {
return new PumpEnactResult().success(false).enacted(false)
.comment(MainApp.gs(R.string.combo_reservoir_level_insufficient_for_bolus));
}