queue independentConnect fix for DanaR pumps
This commit is contained in:
parent
7ae547c6af
commit
fcf7faa3e0
1 changed files with 4 additions and 5 deletions
|
@ -68,12 +68,12 @@ open class CommandQueue @Inject constructor(
|
||||||
private val disposable = CompositeDisposable()
|
private val disposable = CompositeDisposable()
|
||||||
|
|
||||||
private val queue = LinkedList<Command>()
|
private val queue = LinkedList<Command>()
|
||||||
private var thread: QueueThread? = null
|
@Volatile private var thread: QueueThread? = null
|
||||||
|
|
||||||
var performing: Command? = null
|
@Volatile var performing: Command? = null
|
||||||
|
|
||||||
init {
|
init {
|
||||||
disposable.add(rxBus
|
disposable += rxBus
|
||||||
.toObservable(EventProfileSwitchChanged::class.java)
|
.toObservable(EventProfileSwitchChanged::class.java)
|
||||||
.observeOn(aapsSchedulers.io)
|
.observeOn(aapsSchedulers.io)
|
||||||
.subscribe({
|
.subscribe({
|
||||||
|
@ -109,8 +109,6 @@ open class CommandQueue @Inject constructor(
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, fabricPrivacy::logException)
|
}, fabricPrivacy::logException)
|
||||||
)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun executingNowError(): PumpEnactResult =
|
private fun executingNowError(): PumpEnactResult =
|
||||||
|
@ -197,6 +195,7 @@ open class CommandQueue @Inject constructor(
|
||||||
aapsLogger.debug(LTag.PUMPQUEUE, "Starting new queue")
|
aapsLogger.debug(LTag.PUMPQUEUE, "Starting new queue")
|
||||||
val tempCommandQueue = CommandQueue(injector, aapsLogger, rxBus, aapsSchedulers, resourceHelper, constraintChecker, profileFunction, activePlugin, context, sp, buildHelper, dateUtil, repository, fabricPrivacy)
|
val tempCommandQueue = CommandQueue(injector, aapsLogger, rxBus, aapsSchedulers, resourceHelper, constraintChecker, profileFunction, activePlugin, context, sp, buildHelper, dateUtil, repository, fabricPrivacy)
|
||||||
tempCommandQueue.readStatus(reason, callback)
|
tempCommandQueue.readStatus(reason, callback)
|
||||||
|
tempCommandQueue.disposable.clear()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
|
|
Loading…
Reference in a new issue