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() {
|
||||
aapsLogger.debug(LTag.PUMPBTCOMM, "Reset connection")
|
||||
connected?.countDown()
|
||||
serviceDiscoveryComplete?.countDown()
|
||||
connected.countDown()
|
||||
serviceDiscoveryComplete.countDown()
|
||||
connected = CountDownLatch(1)
|
||||
serviceDiscoveryComplete = CountDownLatch(1)
|
||||
flushConfirmationQueue()
|
||||
|
|
|
@ -37,8 +37,8 @@ class MessageIO(
|
|||
fun sendMessage(msg: MessagePacket): MessageSendResult {
|
||||
val foundRTS = cmdBleIO.flushIncomingQueue()
|
||||
if (foundRTS) {
|
||||
val msg = receiveMessage(false)
|
||||
aapsLogger.warn(LTag.PUMPBTCOMM, "sendMessage received message=$msg")
|
||||
val receivedMessage = receiveMessage(false)
|
||||
aapsLogger.warn(LTag.PUMPBTCOMM, "sendMessage received message=$receivedMessage")
|
||||
throw IllegalStateException("Received message while trying to send")
|
||||
}
|
||||
dataBleIO.flushIncomingQueue()
|
||||
|
|
|
@ -15,8 +15,6 @@ class BasalProgram(
|
|||
|
||||
fun hasZeroUnitSegments() = segments.any { it.basalRateInHundredthUnitsPerHour == 0 }
|
||||
|
||||
fun isZeroBasal() = segments.sumBy(Segment::basalRateInHundredthUnitsPerHour) == 0
|
||||
|
||||
fun rateAt(date: Date): Double {
|
||||
val instance = Calendar.getInstance()
|
||||
instance.time = date
|
||||
|
|
Loading…
Reference in a new issue