diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/BleIO.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/BleIO.kt index e7033d5a0c..f86bcfd36a 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/BleIO.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/BleIO.kt @@ -53,6 +53,7 @@ open class BleIO( * @param characteristic where to write to(CMD or DATA) * @param payload the data to send */ + @Suppress("ReturnCount") fun sendAndConfirmPacket(payload: ByteArray): BleSendResult { aapsLogger.debug(LTag.PUMPBTCOMM, "BleIO: Sending on $type: ${payload.toHex()}") val set = characteristic.setValue(payload) diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessageIO.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessageIO.kt index c544db8001..e28acbd5c5 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessageIO.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessageIO.kt @@ -33,6 +33,7 @@ class MessageIO( var maxMessageReadTries = 3 var messageReadTries = 0 + @Suppress("ReturnCount") fun sendMessage(msg: MessagePacket): MessageSendResult { cmdBleIO.flushIncomingQueue() dataBleIO.flushIncomingQueue() @@ -83,6 +84,7 @@ class MessageIO( } } + @Suppress("ReturnCount") fun receiveMessage(): MessagePacket? { val expectRTS = cmdBleIO.expectCommandType(BleCommandRTS, MESSAGE_READ_TIMEOUT_MS) if (expectRTS !is BleConfirmSuccess) { @@ -179,6 +181,7 @@ class MessageIO( } } + @Suppress("ReturnCount") private fun expectBlePacket(index: Byte, nackOnTimeout: Boolean = false): PacketReceiveResult { receivedOutOfOrder[index]?.let { return PacketReceiveSuccess(it) diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Session.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Session.kt index 377e625dc8..abf138e673 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Session.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Session.kt @@ -69,6 +69,7 @@ class Session( CommandSendErrorSending(errMsg) } + @Suppress("ReturnCount") fun readAndAckResponse(responseType: KClass): CommandReceiveResult { var responseMsgPacket: MessagePacket? = null for (i in 0..MAX_TRIES) {