getPumpStatus only if requested by user while the pod is not activated
This commit is contained in:
parent
3c222f0500
commit
c50757a2d1
1 changed files with 5 additions and 0 deletions
|
@ -130,6 +130,11 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
}
|
||||
|
||||
override fun getPumpStatus(reason: String) {
|
||||
if (reason != "REQUESTED BY USER" && !podStateManager.isActivationCompleted) {
|
||||
// prevent races on BLE whent the pod is not activated
|
||||
return
|
||||
}
|
||||
|
||||
val throwable = getPodStatus().blockingGet()
|
||||
if (throwable != null) {
|
||||
aapsLogger.error(LTag.PUMP, "Error in getPumpStatus", throwable)
|
||||
|
|
Loading…
Reference in a new issue