fix compiler warnings
This commit is contained in:
parent
657a8f149b
commit
26321344eb
3 changed files with 4 additions and 6 deletions
|
@ -211,8 +211,8 @@ class BleCommCallbacks(
|
||||||
|
|
||||||
fun resetConnection() {
|
fun resetConnection() {
|
||||||
aapsLogger.debug(LTag.PUMPBTCOMM, "Reset connection")
|
aapsLogger.debug(LTag.PUMPBTCOMM, "Reset connection")
|
||||||
connected?.countDown()
|
connected.countDown()
|
||||||
serviceDiscoveryComplete?.countDown()
|
serviceDiscoveryComplete.countDown()
|
||||||
connected = CountDownLatch(1)
|
connected = CountDownLatch(1)
|
||||||
serviceDiscoveryComplete = CountDownLatch(1)
|
serviceDiscoveryComplete = CountDownLatch(1)
|
||||||
flushConfirmationQueue()
|
flushConfirmationQueue()
|
||||||
|
|
|
@ -37,8 +37,8 @@ class MessageIO(
|
||||||
fun sendMessage(msg: MessagePacket): MessageSendResult {
|
fun sendMessage(msg: MessagePacket): MessageSendResult {
|
||||||
val foundRTS = cmdBleIO.flushIncomingQueue()
|
val foundRTS = cmdBleIO.flushIncomingQueue()
|
||||||
if (foundRTS) {
|
if (foundRTS) {
|
||||||
val msg = receiveMessage(false)
|
val receivedMessage = receiveMessage(false)
|
||||||
aapsLogger.warn(LTag.PUMPBTCOMM, "sendMessage received message=$msg")
|
aapsLogger.warn(LTag.PUMPBTCOMM, "sendMessage received message=$receivedMessage")
|
||||||
throw IllegalStateException("Received message while trying to send")
|
throw IllegalStateException("Received message while trying to send")
|
||||||
}
|
}
|
||||||
dataBleIO.flushIncomingQueue()
|
dataBleIO.flushIncomingQueue()
|
||||||
|
|
|
@ -15,8 +15,6 @@ class BasalProgram(
|
||||||
|
|
||||||
fun hasZeroUnitSegments() = segments.any { it.basalRateInHundredthUnitsPerHour == 0 }
|
fun hasZeroUnitSegments() = segments.any { it.basalRateInHundredthUnitsPerHour == 0 }
|
||||||
|
|
||||||
fun isZeroBasal() = segments.sumBy(Segment::basalRateInHundredthUnitsPerHour) == 0
|
|
||||||
|
|
||||||
fun rateAt(date: Date): Double {
|
fun rateAt(date: Date): Double {
|
||||||
val instance = Calendar.getInstance()
|
val instance = Calendar.getInstance()
|
||||||
instance.time = date
|
instance.time = date
|
||||||
|
|
Loading…
Reference in a new issue