From b64d530ae9e1c36f186c4780dbcd53559e6b3455 Mon Sep 17 00:00:00 2001 From: Andrei Vereha Date: Wed, 21 Apr 2021 23:29:16 +0200 Subject: [PATCH] ktlintFormat --- .../plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt | 1 - .../plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt | 1 - .../plugins/pump/omnipod/dash/driver/comm/session/Connection.kt | 2 +- .../dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt | 2 -- .../androidaps/plugins/pump/omnipod/dash/history/DashHistory.kt | 2 +- .../plugins/pump/omnipod/dash/history/data/ResultStates.kt | 2 +- 6 files changed, 3 insertions(+), 7 deletions(-) diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt index f317c3d65b..36a32c95d0 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt @@ -33,7 +33,6 @@ import io.reactivex.Observable import io.reactivex.Single import io.reactivex.rxkotlin.blockingSubscribeBy import io.reactivex.rxkotlin.subscribeBy -import io.reactivex.rxkotlin.toCompletable import org.json.JSONObject import java.util.* import javax.inject.Inject diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt index 78fbd17bff..a37baf1fd2 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt @@ -662,7 +662,6 @@ class OmnipodDashManagerImpl @Inject constructor( // TODO: is it bad if we increment this sequence number when we failed to send the command? } - is PodEvent.ResponseReceived -> { podStateManager.increaseMessageSequenceNumber() handleResponse(event.response) diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Connection.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Connection.kt index 4ab0ed9d53..4c3688d42c 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Connection.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Connection.kt @@ -86,7 +86,7 @@ class Connection( val msgIO = MessageIO(aapsLogger, cmdBleIO, dataBleIO) fun connect() { - if (session!=null) { + if (session != null) { disconnect() } aapsLogger.debug("Connecting") diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt index 4f4bdbc098..ccd6931e11 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt @@ -2,7 +2,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state import android.os.SystemClock import com.google.gson.Gson -import info.nightscout.androidaps.data.PumpEnactResult import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.plugins.bus.RxBusWrapper @@ -20,7 +19,6 @@ 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.Single import java.io.Serializable import java.util.* import javax.inject.Inject diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/history/DashHistory.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/history/DashHistory.kt index 678036febe..66fc8f614b 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/history/DashHistory.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/history/DashHistory.kt @@ -39,7 +39,7 @@ class DashHistory @Inject constructor( fun createRecord( commandType: OmnipodCommandType, date: Long = System.currentTimeMillis(), - initialResult: InitialResult = InitialResult.CREATED, + initialResult: InitialResult = InitialResult.NOT_SENT, tempBasalRecord: TempBasalRecord? = null, bolusRecord: BolusRecord? = null, resolveResult: ResolvedResult? = null, diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/history/data/ResultStates.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/history/data/ResultStates.kt index c7b134c5fb..ee92d9ed78 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/history/data/ResultStates.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/history/data/ResultStates.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data enum class InitialResult { - CREATED, FAILURE_SENDING, UNCONFIRMED, SENT + NOT_SENT, FAILURE_SENDING, UNCONFIRMED, SENT } enum class ResolvedResult {