From 06de8a04e2621eb754a015d266e9360da61327b0 Mon Sep 17 00:00:00 2001 From: Bart Sopers Date: Sun, 14 Mar 2021 23:11:48 +0100 Subject: [PATCH] Log actual received message type for unknown Omnipod Dash responses --- .../pump/omnipod/dash/driver/comm/session/ResponseUtil.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/ResponseUtil.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/ResponseUtil.kt index ec2599b56d..cf3f314b59 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/ResponseUtil.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/ResponseUtil.kt @@ -13,7 +13,7 @@ object ResponseUtil { ResponseType.DEFAULT_STATUS_RESPONSE -> DefaultStatusResponse(payload) ResponseType.ADDITIONAL_STATUS_RESPONSE -> parseAdditionalStatusResponse(payload) ResponseType.NAK_RESPONSE -> NakResponse(payload) - ResponseType.UNKNOWN -> throw CouldNotParseResponseException("Unrecognized message type: $responseType") + ResponseType.UNKNOWN -> throw CouldNotParseResponseException("Unrecognized message type: ${payload[0]}") } } @@ -22,7 +22,7 @@ object ResponseUtil { return when (val activationResponseType = byValue(payload[1], ResponseType.ActivationResponseType.UNKNOWN)) { ResponseType.ActivationResponseType.GET_VERSION_RESPONSE -> VersionResponse(payload) ResponseType.ActivationResponseType.SET_UNIQUE_ID_RESPONSE -> SetUniqueIdResponse(payload) - ResponseType.ActivationResponseType.UNKNOWN -> throw CouldNotParseResponseException("Unrecognized activation response type: $activationResponseType") + ResponseType.ActivationResponseType.UNKNOWN -> throw CouldNotParseResponseException("Unrecognized activation response type: ${payload[1]}") } } @@ -38,7 +38,7 @@ object ResponseUtil { ResponseType.StatusResponseType.STATUS_RESPONSE_PAGE_70 -> throw UnsupportedOperationException("Status response page 70 is not (yet) implemented") ResponseType.StatusResponseType.STATUS_RESPONSE_PAGE_80 -> throw UnsupportedOperationException("Status response page 80 is not (yet) implemented") ResponseType.StatusResponseType.STATUS_RESPONSE_PAGE_81 -> throw UnsupportedOperationException("Status response page 81 is not (yet) implemented") - ResponseType.StatusResponseType.UNKNOWN -> throw CouldNotParseResponseException("Unrecognized additional status response type: $additionalStatusResponseType") + ResponseType.StatusResponseType.UNKNOWN -> throw CouldNotParseResponseException("Unrecognized additional status response type: ${payload[2]}") } } } \ No newline at end of file