From 950c745ab7136a09c86b4644ea9f61a628a9febd Mon Sep 17 00:00:00 2001 From: Andrei Vereha Date: Sat, 25 Sep 2021 18:51:44 +0200 Subject: [PATCH] cleanup before merging to dev --- .../nightscout/androidaps/interfaces/PumpSync.kt | 2 +- .../comm/exceptions/IllegalResponseException.kt | 9 --------- .../driver/comm/exceptions/NakResponseException.kt | 6 ------ .../driver/comm/exceptions/PodAlarmException.kt | 13 ------------- 4 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/exceptions/IllegalResponseException.kt delete mode 100644 omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/exceptions/NakResponseException.kt delete mode 100644 omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/exceptions/PodAlarmException.kt diff --git a/core/src/main/java/info/nightscout/androidaps/interfaces/PumpSync.kt b/core/src/main/java/info/nightscout/androidaps/interfaces/PumpSync.kt index e7c606e458..cc14666dac 100644 --- a/core/src/main/java/info/nightscout/androidaps/interfaces/PumpSync.kt +++ b/core/src/main/java/info/nightscout/androidaps/interfaces/PumpSync.kt @@ -449,4 +449,4 @@ interface PumpSync { fun createOrUpdateTotalDailyDose(timestamp: Long, bolusAmount: Double, basalAmount: Double, totalAmount: Double, pumpId: Long?, pumpType: PumpType, pumpSerial: String): Boolean -} +} \ No newline at end of file diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/exceptions/IllegalResponseException.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/exceptions/IllegalResponseException.kt deleted file mode 100644 index 931be4d900..0000000000 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/exceptions/IllegalResponseException.kt +++ /dev/null @@ -1,9 +0,0 @@ -package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions - -import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.Response -import kotlin.reflect.KClass - -class IllegalResponseException( - expectedResponseType: KClass, - actualResponse: Response -) : Exception("Illegal response: expected ${expectedResponseType.simpleName} but got $actualResponse") diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/exceptions/NakResponseException.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/exceptions/NakResponseException.kt deleted file mode 100644 index 93e4c408b4..0000000000 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/exceptions/NakResponseException.kt +++ /dev/null @@ -1,6 +0,0 @@ -package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions - -import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.NakResponse - -class NakResponseException(val response: NakResponse) : - Exception("Received NAK response: ${response.nakErrorType.value} ${response.nakErrorType.name}") diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/exceptions/PodAlarmException.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/exceptions/PodAlarmException.kt deleted file mode 100644 index 0f4968c32d..0000000000 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/exceptions/PodAlarmException.kt +++ /dev/null @@ -1,13 +0,0 @@ -package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions - -import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.AlarmStatusResponse -import java.util.* - -class PodAlarmException(val response: AlarmStatusResponse) : Exception( - String.format( - Locale.getDefault(), - "Pod is in alarm: %03d %s", - response.alarmType.value.toInt() and 0xff, - response.alarmType.name - ) -)