diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/manager/OmnipodManager.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/manager/OmnipodManager.java
index d89b1ac6fe..579fe4b611 100644
--- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/manager/OmnipodManager.java
+++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/manager/OmnipodManager.java
@@ -243,7 +243,7 @@ public class OmnipodManager {
logStartingCommandExecution("setTemporaryBasal [rate=" + rate + ", duration=" + duration + ", acknowledgementBeep=" + acknowledgementBeep + ", completionBeep=" + completionBeep + "]");
- boolean cancelCurrentTbr = podStateManager.getLastDeliveryStatus().isTbrRunning();
+ boolean cancelCurrentTbr = podStateManager.isTempBasalRunning();
try {
if (cancelCurrentTbr) {
diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsOmnipodManager.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsOmnipodManager.java
index dd3d20aac5..7e073316a3 100644
--- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsOmnipodManager.java
+++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsOmnipodManager.java
@@ -248,7 +248,14 @@ public class AapsOmnipodManager {
addFailureToHistory(historyEntryType, comment);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment);
} catch (DeliveryStatusVerificationFailedException ex) {
- String comment = getStringResource(R.string.omnipod_error_set_basal_failed_delivery_might_be_suspended);
+ String comment;
+ if(ex.getExpectedStatus() == DeliveryStatus.SUSPENDED) {
+ // Happened when suspending delivery before setting the new profile
+ comment = getStringResource(R.string.omnipod_error_set_basal_failed_delivery_might_be_suspended);
+ } else {
+ // Happened when setting the new profile (after suspending delivery)
+ comment = getStringResource(R.string.omnipod_error_set_basal_might_have_failed_delivery_might_be_suspended);
+ }
showNotification(comment, Notification.URGENT, R.raw.boluserror);
addFailureToHistory(historyEntryType, comment);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment);
diff --git a/omnipod/src/main/res/values/strings.xml b/omnipod/src/main/res/values/strings.xml
index a1b825a75f..6d1dc144c5 100644
--- a/omnipod/src/main/res/values/strings.xml
+++ b/omnipod/src/main/res/values/strings.xml
@@ -133,7 +133,8 @@
Shutdown is imminent
Low reservoir
Unknown alert
- Setting basal profile might have failed. Delivery might be suspended! Please manually refresh the Pod status from the Omnipod tab and resume delivery if needed.
+ Setting basal profile failed. Delivery might be suspended! Please manually refresh the Pod status from the Omnipod tab and resume delivery if needed.
+ Setting basal profile might have failed. Delivery might be suspended! Please manually refresh the Pod status from the Omnipod tab and resume delivery if needed.
Setting basal profile failed. Delivery is suspended! Please manually resume delivery from the Omnipod tab.
Setting temp basal failed. If a temp basal was previously running, it might have been cancelled. Please manually refresh the Pod status from the Omnipod tab.
Setting temp might have basal failed. If a temp basal was previously running, it has been cancelled. Please manually refresh the Pod status from the Omnipod tab.