Merge pull request #2631 from jbr7rr/fix-pump-disconnect-alarms
Fix pump disconnect alarms
This commit is contained in:
commit
a25da53e5a
1 changed files with 4 additions and 1 deletions
|
@ -191,7 +191,10 @@ class KeepAliveWorker(
|
||||||
}
|
}
|
||||||
if (loop.isDisconnected) {
|
if (loop.isDisconnected) {
|
||||||
// do nothing if pump is disconnected
|
// do nothing if pump is disconnected
|
||||||
} else if (runningProfile == null || ((!pump.isThisProfileSet(requestedProfile) || !requestedProfile.isEqual(runningProfile) || (runningProfile is ProfileSealed.EPS && runningProfile.value.originalEnd < dateUtil.now())) && !commandQueue.isRunning(Command.CommandType.BASAL_PROFILE))) {
|
} else if (runningProfile == null || ((!pump.isThisProfileSet(requestedProfile) || !requestedProfile.isEqual(runningProfile)
|
||||||
|
|| (runningProfile is ProfileSealed.EPS && runningProfile.value.originalEnd < dateUtil.now() && runningProfile.value.originalDuration != 0L))
|
||||||
|
&& !commandQueue.isRunning(Command.CommandType.BASAL_PROFILE)))
|
||||||
|
{
|
||||||
rxBus.send(EventProfileSwitchChanged())
|
rxBus.send(EventProfileSwitchChanged())
|
||||||
} else if (isStatusOutdated && !pump.isBusy()) {
|
} else if (isStatusOutdated && !pump.isBusy()) {
|
||||||
lastReadStatus = now
|
lastReadStatus = now
|
||||||
|
|
Loading…
Reference in a new issue