ktlint. update ktlint gradle plugin
This commit is contained in:
parent
9a009d2f96
commit
f289cd50c5
|
@ -63,7 +63,7 @@ buildscript {
|
|||
|
||||
plugins {
|
||||
id "io.gitlab.arturbosch.detekt" version "1.16.0-RC2"
|
||||
id "org.jlleitschuh.gradle.ktlint" version "9.4.1"
|
||||
id "org.jlleitschuh.gradle.ktlint" version "10.1.0"
|
||||
}
|
||||
|
||||
allprojects {
|
||||
|
|
|
@ -53,7 +53,6 @@ import javax.inject.Inject
|
|||
import javax.inject.Singleton
|
||||
import kotlin.concurrent.thread
|
||||
import kotlin.math.ceil
|
||||
import kotlin.math.exp
|
||||
import kotlin.random.Random
|
||||
|
||||
@Singleton
|
||||
|
@ -147,7 +146,17 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
rxBus.send(EventNewNotification(notification))
|
||||
} else {
|
||||
rxBus.send(EventDismissNotification(Notification.OMNIPOD_POD_SUSPENDED))
|
||||
// TODO: time out of sync notification?
|
||||
if (!TimeZone.getDefault().equals(podStateManager.timeZone)) {
|
||||
val notification =
|
||||
Notification(
|
||||
Notification.OMNIPOD_TIME_OUT_OF_SYNC,
|
||||
"Timezone on pod is different from the timezone on phone. " +
|
||||
"Basal rate is incorrect" +
|
||||
"Switch profile to fix",
|
||||
Notification.NORMAL
|
||||
)
|
||||
rxBus.send(EventNewNotification(notification))
|
||||
}
|
||||
}
|
||||
}
|
||||
nextPodWarningCheck = DateTimeUtil.getTimeInFutureFromMinutes(15)
|
||||
|
@ -158,7 +167,8 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
if (podStateManager.isPodRunning &&
|
||||
podStateManager.activeCommand != null &&
|
||||
commandQueue.size() == 0 &&
|
||||
commandQueue.performing() == null) {
|
||||
commandQueue.performing() == null
|
||||
) {
|
||||
commandQueue.readStatus("Unconfirmed command", null)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
|
||||
import java.lang.IllegalArgumentException
|
||||
import java.util.concurrent.CountDownLatch
|
||||
import kotlin.math.absoluteValue
|
||||
|
||||
sealed class ConnectionState
|
||||
|
||||
|
@ -68,8 +67,8 @@ class Connection(
|
|||
|
||||
podState.bluetoothConnectionState = OmnipodDashPodStateManager.BluetoothConnectionState.CONNECTING
|
||||
val autoConnect = false
|
||||
val gatt = gattConnection ?:
|
||||
podDevice.connectGatt(context, autoConnect, bleCommCallbacks, BluetoothDevice.TRANSPORT_LE)
|
||||
val gatt = gattConnection
|
||||
?: podDevice.connectGatt(context, autoConnect, bleCommCallbacks, BluetoothDevice.TRANSPORT_LE)
|
||||
gattConnection = gatt
|
||||
if (!gatt.connect()) {
|
||||
throw FailedToConnectException("connect() returned false")
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session
|
||||
|
||||
import info.nightscout.androidaps.extensions.toHex
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException
|
||||
import java.util.*
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.StringLengthPrefixEncoding.Companion.parseKeys
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.base.Command
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.Response
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
sealed class CommandSendResult
|
||||
object CommandSendSuccess : CommandSendResult()
|
||||
|
|
|
@ -3,7 +3,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state
|
|||
import info.nightscout.androidaps.data.DetailedBolusInfo
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Id
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.pair.PairResult
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.event.PodEvent
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.*
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.AlarmStatusResponse
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.DefaultStatusResponse
|
||||
|
@ -11,10 +10,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.VersionResponse
|
||||
import io.reactivex.Completable
|
||||
import io.reactivex.Maybe
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.Single
|
||||
import org.joda.time.DateTime
|
||||
import org.joda.time.DateTimeZone
|
||||
import org.joda.time.Duration
|
||||
import java.io.Serializable
|
||||
import java.util.*
|
||||
|
|
|
@ -11,7 +11,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.R
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Id
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.pair.PairResult
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.EapSqn
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.event.PodEvent
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.*
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.AlarmStatusResponse
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.DefaultStatusResponse
|
||||
|
@ -20,10 +19,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.
|
|||
import info.nightscout.androidaps.utils.sharedPreferences.SP
|
||||
import io.reactivex.Completable
|
||||
import io.reactivex.Maybe
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.Single
|
||||
import org.joda.time.DateTime
|
||||
import org.joda.time.DateTimeZone
|
||||
import org.joda.time.Duration
|
||||
import java.io.Serializable
|
||||
import java.util.*
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.ui
|
||||
|
||||
import android.content.Intent
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
|
@ -286,7 +285,8 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
|
|||
// Update Pod expiry time
|
||||
val expiresAt = podStateManager.expiry
|
||||
podInfoBinding.podExpiryDate.text = expiresAt?.let {
|
||||
readableZonedTime(it) }
|
||||
readableZonedTime(it)
|
||||
}
|
||||
?: PLACEHOLDER
|
||||
podInfoBinding.podExpiryDate.setTextColor(
|
||||
if (expiresAt != null && DateTime.now().isAfter(expiresAt))
|
||||
|
|
Loading…
Reference in a new issue