Merge pull request #2631 from jbr7rr/fix-pump-disconnect-alarms

Fix pump disconnect alarms
This commit is contained in:
Milos Kozak 2023-07-20 14:46:46 +02:00 committed by GitHub
commit a25da53e5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -191,7 +191,10 @@ class KeepAliveWorker(
}
if (loop.isDisconnected) {
// 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())
} else if (isStatusOutdated && !pump.isBusy()) {
lastReadStatus = now