From 6cb742d4e9428843facc8db8f0f91631bd97f6b0 Mon Sep 17 00:00:00 2001 From: Andrei Vereha Date: Thu, 5 Aug 2021 21:23:45 +0200 Subject: [PATCH] add logging --- .../pod/state/OmnipodDashPodStateManagerImpl.kt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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 07c551a018..6ff2887b39 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 @@ -124,9 +124,18 @@ class OmnipodDashPodStateManagerImpl @Inject constructor( override val sameTimeZone: Boolean get() { val now = System.currentTimeMillis() - val currentOffset = TimeZone.getDefault().getOffset(now) + val currentTimezone = TimeZone.getDefault() + val currentOffset = currentTimezone.getOffset(now) val podOffset = timeZone.getOffset(now) - logger.debug(LTag.PUMPCOMM, "sameTimeZone currentOffset=$currentOffset podOffset=$podOffset") + logger.debug( + LTag.PUMPCOMM, + "sameTimeZone currentTimezone=${currentTimezone.getDisplayName( + true, + TimeZone.SHORT + )} " + + "currentOffset=$currentOffset " + + "podOffset=$podOffset" + ) return currentOffset == podOffset } @@ -588,7 +597,7 @@ class OmnipodDashPodStateManagerImpl @Inject constructor( override fun updateFromAlarmStatusResponse(response: AlarmStatusResponse) { logger.info( LTag.PUMP, - "Received AlarmStatusReponse: $response" + "Received AlarmStatusResponse: $response" ) podState.deliveryStatus = response.deliveryStatus podState.podStatus = response.podStatus