From 1107d00571865db3ecdace6503602392a0a4dd63 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 31 Jan 2018 00:55:30 +0100 Subject: [PATCH] Fix pump state display during init. (cherry picked from commit 3967c4b) --- .../androidaps/plugins/PumpCombo/ComboPlugin.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java index 54cf5406b8..789474f7d0 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java @@ -151,13 +151,13 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf PumpState ps = pump.state; if (!validBasalRateProfileSelectedOnPump) { return MainApp.gs(R.string.loopdisabled); + } else if (!pump.initialized) { + return MainApp.gs(R.string.combo_pump_state_initializing); } else if (ps.activeAlert != null) { return ps.activeAlert.errorCode != null ? "E" + ps.activeAlert.errorCode + ": " + ps.activeAlert.message : "W" + ps.activeAlert.warningCode + ": " + ps.activeAlert.message; - } else if (ps.menu == null) - return MainApp.gs(R.string.combo_pump_state_initializing); - else if (ps.suspended && (ps.batteryState == PumpState.EMPTY || ps.insulinState == PumpState.EMPTY)) + } else if (ps.suspended && (ps.batteryState == PumpState.EMPTY || ps.insulinState == PumpState.EMPTY)) return MainApp.gs(R.string.combo_pump_state_suspended_due_to_error); else if (ps.suspended) return MainApp.gs(R.string.combo_pump_state_suspended_by_user);