From 0c7b2e1953d992022d2a53dca702c1a7a0f3ef85 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Sun, 3 Dec 2017 20:56:35 +0100 Subject: [PATCH] Remove last bolus, units display of reservoir level from Combo fragment. (cherry picked from commit 42847cb) --- .../androidaps/plugins/PumpCombo/ComboFragment.java | 11 +++++++---- app/src/main/res/layout/combopump_fragment.xml | 2 ++ app/src/main/res/values/strings.xml | 7 +++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java index 4eac04d8e2..2f85a2f045 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java @@ -40,7 +40,7 @@ public class ComboFragment extends SubscriberFragment implements View.OnClickLis batteryView = (TextView) view.findViewById(R.id.combo_pumpstate_battery); reservoirView = (TextView) view.findViewById(R.id.combo_insulinstate); lastConnectionView = (TextView) view.findViewById(R.id.combo_lastconnection); - lastBolusView = (TextView) view.findViewById(R.id.combo_last_bolus); + //lastBolusView = (TextView) view.findViewById(R.id.combo_last_bolus); tempBasalText = (TextView) view.findViewById(R.id.combo_temp_basal); buttonsLayout = (LinearLayout) view.findViewById(R.id.combo_buttons_layout); @@ -86,7 +86,7 @@ public class ComboFragment extends SubscriberFragment implements View.OnClickLis } @Subscribe - public void onStatusEvent(final EventComboPumpUpdateGUI ev) { + public void onStatusEvent(final EventComboPumpUpdateGUI ignored) { updateGUI(); } @@ -130,14 +130,15 @@ public class ComboFragment extends SubscriberFragment implements View.OnClickLis } // reservoir - int reservoirLevel = plugin.getPump().reservoirLevel; - reservoirView.setText(reservoirLevel == -1 ? "" : "" + reservoirLevel + " U"); if (ps.insulinState == PumpState.LOW) { reservoirView.setTextColor(Color.YELLOW); + reservoirView.setText(R.string.combo_reservoir_low); } else if (ps.insulinState == PumpState.EMPTY) { reservoirView.setTextColor(Color.RED); + reservoirView.setText(R.string.combo_reservoir_empty); } else { reservoirView.setTextColor(Color.WHITE); + reservoirView.setText(R.string.combo_reservoir_normal); } // last connection @@ -154,6 +155,7 @@ public class ComboFragment extends SubscriberFragment implements View.OnClickLis lastConnectionView.setTextColor(Color.WHITE); } +/* trigger pump bug // last bolus Bolus bolus = plugin.getPump().lastBolus; if (bolus != null && bolus.timestamp + 6 * 60 * 60 * 1000 >= System.currentTimeMillis()) { @@ -175,6 +177,7 @@ public class ComboFragment extends SubscriberFragment implements View.OnClickLis } else { lastBolusView.setText(""); } +*/ // TBR String tbrStr = ""; diff --git a/app/src/main/res/layout/combopump_fragment.xml b/app/src/main/res/layout/combopump_fragment.xml index f6921691ea..8c642af96c 100644 --- a/app/src/main/res/layout/combopump_fragment.xml +++ b/app/src/main/res/layout/combopump_fragment.xml @@ -236,6 +236,7 @@ + missed_bg_readings_threshold Urgent Alarm INFO - To retrieve the alert history from the pump, long press the Refresh button. - To retrieve the TDD history from the pump, long press the Refresh button. + To retrieve the alert history from the pump, long press the Refresh button. NOTE: this can trigger a bug which causes the pump to reject all connection attempts and requires pressing a button on the pump to recover and should therefore be avoided. + To retrieve the TDD history from the pump, long press the Refresh button. NOTE: this can trigger a bug which causes the pump to reject all connection attempts and requires pressing a button on the pump to recover and should therefore be avoided. sync_profile_to_pump Minimum: %3.1f U Average: %3.1f U Maximum: %3.1f U + Low + Empty + Normal