diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt index af763cd1f5..42b6784be5 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt @@ -475,7 +475,7 @@ class OmnipodDashPumpPlugin @Inject constructor( // If it gets called later, we will have the command as "not sent" in history and will not try to // get it's final status, even if it was send - podStateManager.markActiveCommandFailed() + podStateManager.maybeMarkActiveCommandFailed() source.onSuccess( PumpEnactResult(injector).success(false).enacted(false).comment(throwable.message) ) diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManager.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManager.kt index d01fd1f5c4..bd20c1c9b7 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManager.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManager.kt @@ -68,7 +68,7 @@ interface OmnipodDashPodStateManager { fun createActiveCommand(historyId: String): Completable fun updateActiveCommand(): Maybe - fun markActiveCommandFailed() + fun maybeMarkActiveCommandFailed() data class ActiveCommand( val sequence: Short, diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt index b5134dd817..2f2f5162e7 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt @@ -201,7 +201,7 @@ class OmnipodDashPodStateManagerImpl @Inject constructor( } @Synchronized - override fun markActiveCommandFailed() { + override fun maybeMarkActiveCommandFailed() { podState.activeCommand?.run { if (sentRealtime < createdRealtime) { // command was not sent