Remove last bolus, units display of reservoir level from Combo fragment.

(cherry picked from commit 42847cb)
This commit is contained in:
Johannes Mockenhaupt 2017-12-03 20:56:35 +01:00
parent afdcf0b1c5
commit 0c7b2e1953
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
3 changed files with 14 additions and 6 deletions

View file

@ -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 = "";

View file

@ -236,6 +236,7 @@
</LinearLayout>
<!-- reading last bolus from pump triggers pump bug
<View
android:layout_width="fill_parent"
android:layout_height="2dip"
@ -280,6 +281,7 @@
android:textSize="14sp" />
</LinearLayout>
-->
<View
android:layout_width="fill_parent"

View file

@ -814,11 +814,14 @@
<string name="key_missed_bg_readings_threshold" translatable="false">missed_bg_readings_threshold</string>
<string name="urgent_alarm">Urgent Alarm</string>
<string name="info">INFO</string>
<string name="combo_empty_alert_history_note">To retrieve the alert history from the pump, long press the Refresh button.</string>
<string name="combo_empty_tdd_history_note">To retrieve the TDD history from the pump, long press the Refresh button.</string>
<string name="combo_empty_alert_history_note">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.</string>
<string name="combo_empty_tdd_history_note">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.</string>
<string name="key_sync_profile_to_pump">sync_profile_to_pump</string>
<string name="combo_tdd_minimum">Minimum: %3.1f U</string>
<string name="combo_tdd_average">Average: %3.1f U</string>
<string name="combo_tdd_maximum">Maximum: %3.1f U</string>
<string name="combo_reservoir_low">Low</string>
<string name="combo_reservoir_empty">Empty</string>
<string name="combo_reservoir_normal">Normal</string>
</resources>