From b46914a97b098a19db0eff372063925e8785b24b Mon Sep 17 00:00:00 2001 From: Bart Sopers Date: Sun, 8 Dec 2019 20:13:15 +0100 Subject: [PATCH] Update suspended status when podstate is null --- .../plugins/pump/omnipod/driver/comm/AapsOmnipodManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManager.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManager.java index 9240e972a5..04cb5143a7 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManager.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManager.java @@ -93,6 +93,7 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface pumpStatus.lastBolusTime = null; pumpStatus.lastBolusAmount = null; pumpStatus.reservoirRemainingUnits = 0.0; + pumpStatus.pumpStatusType = PumpStatusType.Suspended; sendEvent(new EventOmnipodAcknowledgeAlertsChanged()); sendEvent(new EventOmnipodPumpValuesChanged()); } else { @@ -119,7 +120,7 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface if (!Objects.equals(lastBolusTime, pumpStatus.lastBolusTime) // || !Objects.equals(lastBolusUnits, pumpStatus.lastBolusAmount) // || !isReservoirStatusUpToDate(pumpStatus, podSessionState.getReservoirLevel()) - || podSessionState.isSuspended() != pumpStatus.pumpStatusType.equals(PumpStatusType.Suspended)) { + || podSessionState.isSuspended() != PumpStatusType.Suspended.equals(pumpStatus.pumpStatusType)) { pumpStatus.lastBolusTime = lastBolusTime; pumpStatus.lastBolusAmount = lastBolusUnits; pumpStatus.reservoirRemainingUnits = podSessionState.getReservoirLevel() == null ? 75.0 : podSessionState.getReservoirLevel();