This commit is contained in:
Andrei Vereha 2021-06-03 22:18:25 +02:00
commit 17c61db256

View file

@ -333,7 +333,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
return ret
}
private fun observeNoActiveTempBasal(enforeNew: Boolean): Completable {
private fun observeNoActiveTempBasal(enforceNew: Boolean): Completable {
return Completable.defer {
when {
podStateManager.deliveryStatus !in
@ -343,7 +343,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
Completable.complete()
}
!enforeNew ->
!enforceNew ->
Completable.error(
IllegalStateException(
"Temporary basal already active and enforeNew is not set."
@ -364,7 +364,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
private fun observeActiveTempBasal(): Completable {
return Completable.defer {
if (pumpSync.expectedPumpState().temporaryBasal != null)
if (podStateManager.tempBasalActive)
Completable.complete()
else
Completable.error(