Fix pump state display during init.
(cherry picked from commit 3967c4b)
This commit is contained in:
parent
6981c0fec6
commit
1107d00571
|
@ -151,13 +151,13 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
||||||
PumpState ps = pump.state;
|
PumpState ps = pump.state;
|
||||||
if (!validBasalRateProfileSelectedOnPump) {
|
if (!validBasalRateProfileSelectedOnPump) {
|
||||||
return MainApp.gs(R.string.loopdisabled);
|
return MainApp.gs(R.string.loopdisabled);
|
||||||
|
} else if (!pump.initialized) {
|
||||||
|
return MainApp.gs(R.string.combo_pump_state_initializing);
|
||||||
} else if (ps.activeAlert != null) {
|
} else if (ps.activeAlert != null) {
|
||||||
return ps.activeAlert.errorCode != null
|
return ps.activeAlert.errorCode != null
|
||||||
? "E" + ps.activeAlert.errorCode + ": " + ps.activeAlert.message
|
? "E" + ps.activeAlert.errorCode + ": " + ps.activeAlert.message
|
||||||
: "W" + ps.activeAlert.warningCode + ": " + ps.activeAlert.message;
|
: "W" + ps.activeAlert.warningCode + ": " + ps.activeAlert.message;
|
||||||
} else if (ps.menu == null)
|
} else if (ps.suspended && (ps.batteryState == PumpState.EMPTY || ps.insulinState == PumpState.EMPTY))
|
||||||
return MainApp.gs(R.string.combo_pump_state_initializing);
|
|
||||||
else if (ps.suspended && (ps.batteryState == PumpState.EMPTY || ps.insulinState == PumpState.EMPTY))
|
|
||||||
return MainApp.gs(R.string.combo_pump_state_suspended_due_to_error);
|
return MainApp.gs(R.string.combo_pump_state_suspended_due_to_error);
|
||||||
else if (ps.suspended)
|
else if (ps.suspended)
|
||||||
return MainApp.gs(R.string.combo_pump_state_suspended_by_user);
|
return MainApp.gs(R.string.combo_pump_state_suspended_by_user);
|
||||||
|
|
Loading…
Reference in a new issue