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 d33b8ebf1a..f2fe746099 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
@@ -711,7 +711,8 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
if (activeAlert != null) {
if (activeAlert.warningCode != null
&& (activeAlert.warningCode == PumpWarningCodes.CARTRIDGE_LOW ||
- activeAlert.warningCode == PumpWarningCodes.BATTERY_LOW)) {
+ activeAlert.warningCode == PumpWarningCodes.BATTERY_LOW ||
+ activeAlert.warningCode == PumpWarningCodes.TBR_CANCELLED)) {
// turn benign warnings into notifications
notifyAboutPumpWarning(activeAlert);
ruffyScripter.confirmAlert(activeAlert.warningCode);
@@ -732,16 +733,23 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
}
private void notifyAboutPumpWarning(WarningOrErrorCode activeAlert) {
- if (activeAlert.warningCode == null || (activeAlert.warningCode.equals(PumpWarningCodes.CARTRIDGE_LOW) && activeAlert.warningCode.equals(PumpWarningCodes.BATTERY_LOW))) {
+ if (activeAlert.warningCode == null ||
+ (!activeAlert.warningCode.equals(PumpWarningCodes.CARTRIDGE_LOW)
+ && !activeAlert.warningCode.equals(PumpWarningCodes.BATTERY_LOW)
+ && !activeAlert.warningCode.equals(PumpWarningCodes.TBR_CANCELLED))) {
throw new IllegalArgumentException(activeAlert.toString());
}
Notification notification = new Notification();
notification.date = new Date();
notification.id = Notification.COMBO_PUMP_ALARM;
notification.level = Notification.NORMAL;
- notification.text = activeAlert.warningCode == PumpWarningCodes.CARTRIDGE_LOW
- ? MainApp.sResources.getString(R.string.combo_pump_cartridge_low_warrning)
- : MainApp.sResources.getString(R.string.combo_pump_battery_low_warrning);
+ if (activeAlert.warningCode == PumpWarningCodes.CARTRIDGE_LOW) {
+ notification.text = MainApp.sResources.getString(R.string.combo_pump_cartridge_low_warrning);
+ } else if (activeAlert.warningCode == PumpWarningCodes.BATTERY_LOW) {
+ notification.text = MainApp.sResources.getString(R.string.combo_pump_battery_low_warrning);
+ } else if (activeAlert.warningCode == PumpWarningCodes.TBR_CANCELLED) {
+ notification.text = MainApp.sResources.getString(R.string.combo_pump_tbr_cancelled_warrning);
+ }
MainApp.bus().post(new EventNewNotification(notification));
}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 92ef2a5a9e..42318c422e 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -830,5 +830,11 @@
Low
Empty
Normal
+ Pump clock update needed
+ History
+ Warning
+ This will read the full history and state of the pump. Everything in \"My Data\" and the basal rate. Boluses and TBRs will be added to Treatments if they don\'t already exist. This can cause entries to be duplicated because the pump\'s time is imprecise. Using this when normally looping with the pump is highly discouraged and reserved for special circumstances. If you still want to do this, long press this button again.\n\nWARNING: 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.
+ Are you really sure you want to read all pump data and take the consequences of this action?
+ TBR CANCELLED warning was confirmed