Small Omnipod improvements
This commit is contained in:
parent
b1abc55def
commit
9b953d1bed
3 changed files with 11 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -133,7 +133,8 @@
|
|||
<string name="omnipod_alert_shutdown_imminent">Shutdown is imminent</string>
|
||||
<string name="omnipod_alert_low_reservoir">Low reservoir</string>
|
||||
<string name="omnipod_alert_unknown_alert">Unknown alert</string>
|
||||
<string name="omnipod_error_set_basal_failed_delivery_might_be_suspended">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.</string>
|
||||
<string name="omnipod_error_set_basal_failed_delivery_might_be_suspended">Setting basal profile failed. Delivery might be suspended! Please manually refresh the Pod status from the Omnipod tab and resume delivery if needed.</string>
|
||||
<string name="omnipod_error_set_basal_might_have_failed_delivery_might_be_suspended">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.</string>
|
||||
<string name="omnipod_error_set_basal_failed_delivery_suspended">Setting basal profile failed. Delivery is suspended! Please manually resume delivery from the Omnipod tab.</string>
|
||||
<string name="omnipod_error_set_temp_basal_failed_old_tbr_might_be_cancelled">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.</string>
|
||||
<string name="omnipod_error_set_temp_basal_failed_old_tbr_cancelled_new_might_have_failed">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.</string>
|
||||
|
|
Loading…
Reference in a new issue