From f6d0520fe213d4118b5197556d9e0f78eef06798 Mon Sep 17 00:00:00 2001 From: Andrei Vereha Date: Sun, 6 Jun 2021 21:25:40 +0200 Subject: [PATCH] save bolusPulsesRemainig --- .../dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt index 7d2df0242b..0fcf15f8dc 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt @@ -323,10 +323,11 @@ class OmnipodDashPodStateManagerImpl @Inject constructor( } override fun updateFromDefaultStatusResponse(response: DefaultStatusResponse) { - logger.debug(LTag.PUMPBTCOMM, "Default status reponse :$response") + logger.debug(LTag.PUMPBTCOMM, "Default status response :$response") podState.deliveryStatus = response.deliveryStatus podState.podStatus = response.podStatus podState.pulsesDelivered = response.totalPulsesDelivered + podState.bolusPulsesRemaining = response.bolusPulsesRemaining if (response.reservoirPulsesRemaining < 1023) { podState.pulsesRemaining = response.reservoirPulsesRemaining } @@ -397,6 +398,8 @@ class OmnipodDashPodStateManagerImpl @Inject constructor( podState.deliveryStatus = response.deliveryStatus podState.podStatus = response.podStatus podState.pulsesDelivered = response.totalPulsesDelivered + podState.bolusPulsesRemaining = response.bolusPulsesRemaining + if (response.reservoirPulsesRemaining < 1023) { podState.pulsesRemaining = response.reservoirPulsesRemaining } @@ -462,6 +465,7 @@ class OmnipodDashPodStateManagerImpl @Inject constructor( var bluetoothAddress: String? = null var ltk: ByteArray? = null var eapAkaSequenceNumber: Long = 1 + var bolusPulsesRemaining: Short = 0 var bleVersion: SoftwareVersion? = null var firmwareVersion: SoftwareVersion? = null