From abbc73ddcfec04fc18f7d7cb5288b7132fee2fb4 Mon Sep 17 00:00:00 2001 From: Dave Carlson Date: Mon, 25 Jul 2022 19:37:04 -0700 Subject: [PATCH 1/2] [omnipod-eros] moot basal set before pod basal activation --- .../omnipod/eros/manager/AapsOmnipodErosManager.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java index faa58d345d..5ede4b8932 100644 --- a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java +++ b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java @@ -291,6 +291,15 @@ public class AapsOmnipodErosManager { return new PumpEnactResult(injector).success(false).enacted(false).comment(note); } + // #1963 return synthetic success if pre-activation + // to allow profile switch prior to pod activation + // otherwise a catch-22 + if (podStateManager.getActivationProgress().isBefore(ActivationProgress.BASAL_INITIALIZED)) { + // TODO: i18n string + return new PumpEnactResult(injector).success(true).enacted(false).comment("pre" + + "-activation basal change moot"); + } + PodHistoryEntryType historyEntryType = podStateManager.isSuspended() ? PodHistoryEntryType.RESUME_DELIVERY : PodHistoryEntryType.SET_BASAL_SCHEDULE; try { From 559fc0b589430592c40af84365b52792f78f7e74 Mon Sep 17 00:00:00 2001 From: Dave Carlson Date: Wed, 3 Aug 2022 16:50:12 -0700 Subject: [PATCH 2/2] change to isCompleted for simplicity --- .../pump/omnipod/eros/manager/AapsOmnipodErosManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java index 5ede4b8932..1bdf9da38c 100644 --- a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java +++ b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java @@ -294,7 +294,7 @@ public class AapsOmnipodErosManager { // #1963 return synthetic success if pre-activation // to allow profile switch prior to pod activation // otherwise a catch-22 - if (podStateManager.getActivationProgress().isBefore(ActivationProgress.BASAL_INITIALIZED)) { + if (!podStateManager.getActivationProgress().isCompleted()) { // TODO: i18n string return new PumpEnactResult(injector).success(true).enacted(false).comment("pre" + "-activation basal change moot");