Merge branch 'pull/1956' into dev

This commit is contained in:
Milos Kozak 2019-08-15 14:40:19 +02:00
commit b5bc80bc52
2 changed files with 12 additions and 0 deletions

View file

@ -791,6 +791,17 @@ public class MedtronicPumpPlugin extends PumpPluginAbstract implements PumpInter
setRefreshButtonEnabled(false);
MedtronicPumpStatus mdtPumpStatus = getMDTPumpStatus();
if (detailedBolusInfo.insulin > mdtPumpStatus.reservoirRemainingUnits) {
return new PumpEnactResult() //
.success(false) //
.enacted(false) //
.comment(MainApp.gs(R.string.medtronic_cmd_bolus_could_not_be_delivered_no_insulin,
mdtPumpStatus.reservoirRemainingUnits,
detailedBolusInfo.insulin));
}
bolusDeliveryType = BolusDeliveryType.DeliveryPrepared;
if (isPumpNotReachable()) {

View file

@ -1644,6 +1644,7 @@
<string name="medtronic_cmd_cant_cancel_tbr_stop_op">Could not cancel current TBR. Stopping operation.</string>
<string name="medtronic_cmd_set_profile_pattern_overflow">Profile set failed, because following patterns, have too big basal rate: %1$s</string>
<string name="medtronic_cmd_bolus_could_not_be_delivered">Bolus could not be delivered.</string>
<string name="medtronic_cmd_bolus_could_not_be_delivered_no_insulin">Bolus could not be delivered, because available insulin amount (%1$.2f) is less than bolus required (%2$.2f).</string>
<string name="medtronic_cmd_tbr_could_not_be_delivered">TBR could not be set.</string>
<string name="medtronic_cmd_cant_cancel_tbr">Could not cancel current TBR.</string>
<string name="medtronic_cmd_basal_profile_could_not_be_set">Basal profile could not be set.</string>