From 11c97bc9375f059181d2d3df231fdaaf3148b2ff Mon Sep 17 00:00:00 2001 From: Andries Smit Date: Tue, 19 Apr 2022 13:32:22 +0200 Subject: [PATCH] chore: remove triple new lines --- .../activities/HistoryBrowseActivity.kt | 1 - .../ProfileFunctionImplementation.kt | 3 +-- .../versionChecker/VersionCheckerPlugin.kt | 1 - .../plugins/general/overview/OverviewFragment.kt | 1 - .../overview/graphExtensions/BolusDataPoint.kt | 3 +-- .../plugins/general/tidepool/comm/Session.kt | 3 +-- .../general/tidepool/elements/ProfileElement.kt | 2 -- .../tidepool/messages/DatasetReplyMessage.kt | 1 - .../androidaps/receivers/DataReceiver.kt | 3 +-- .../queue/CommandQueueImplementationTest.kt | 3 +-- .../automation/actions/ActionCarePortalEvent.kt | 3 +-- .../plugins/general/automation/TestBase.kt | 3 +-- .../activities/NoSplashAppCompatActivity.kt | 1 - .../info/nightscout/androidaps/data/IobTotal.kt | 3 +-- .../androidaps/extensions/Concurrency.kt | 1 - .../extensions/EffectiveProfileSwitchExtension.kt | 3 +-- .../androidaps/extensions/JSONObjectExt.kt | 2 -- .../extensions/OfflineEventExtension.kt | 3 --- .../extensions/ProfileSwitchExtension.kt | 3 --- .../extensions/TherapyEventExtension.kt | 2 -- .../nightscout/androidaps/utils/WarnColors.kt | 3 +-- .../androidaps/danaRv2/comm/MsgCheckValue_v2.kt | 3 +-- .../danar/comm/MsgSettingUserOptions.kt | 3 +-- .../androidaps/diaconn/DiaconnG8Plugin.kt | 2 -- .../androidaps/diaconn/DiaconnG8Pump.kt | 15 +-------------- .../diaconn/di/DiaconnG8PacketModule.kt | 3 +-- .../packet/AppCancelSettingResponsePacket.kt | 3 +-- .../diaconn/packet/BigLogInquireResponsePacket.kt | 5 +---- .../packet/DiaconnG8ResponseMessageHashTable.kt | 1 - .../packet/DisplayTimeInquireResponsePacket.kt | 3 +-- .../packet/LanguageInquireResponsePacket.kt | 3 +-- .../packet/SneckLimitInquireResponsePacket.kt | 3 +-- .../diaconn/packet/SoundInquireResponsePacket.kt | 3 +-- .../diaconn/service/BLECommonService.kt | 1 - .../comm/MedtronicCommunicationManager.kt | 3 +-- .../pump/medtronic/data/MedtronicHistoryData.kt | 4 +--- .../pump/medtronic/data/dto/BasalProfileEntry.kt | 3 +-- .../pump/medtronic/data/dto/BatteryStatusDTO.kt | 4 +--- .../pump/medtronic/data/dto/BolusWizardDTO.kt | 3 +-- .../pump/MedtronicPumpHistoryDecoderUTest.kt | 7 +------ .../medtronic/data/MedtronicHistoryDataUTest.kt | 8 +------- .../omnipod/common/dagger/OmnipodWizardModule.kt | 2 -- .../plugins/pump/common/sync/PumpDbEntry.kt | 4 +--- .../common/dialog/RileyLinkBLEConfigActivity.kt | 4 ++-- 44 files changed, 30 insertions(+), 108 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt index 8abf3ff860..6da631ce46 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt @@ -169,7 +169,6 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() { else windowManager.defaultDisplay.getMetrics(dm) - axisWidth = if (dm.densityDpi <= 120) 3 else if (dm.densityDpi <= 160) 10 else if (dm.densityDpi <= 320) 35 else if (dm.densityDpi <= 420) 50 else if (dm.densityDpi <= 560) 70 else 80 binding.bgGraph.gridLabelRenderer?.gridColor = rh.gac(this, R.attr.graphgrid) binding.bgGraph.gridLabelRenderer?.reloadStyles() diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ProfileFunctionImplementation.kt b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ProfileFunctionImplementation.kt index 63e03478dc..89b1da7047 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ProfileFunctionImplementation.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ProfileFunctionImplementation.kt @@ -130,7 +130,6 @@ class ProfileFunctionImplementation @Inject constructor( } } - return null } @@ -205,4 +204,4 @@ class ProfileFunctionImplementation @Inject constructor( } else returnValue = false return returnValue } -} \ No newline at end of file +} diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/versionChecker/VersionCheckerPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/versionChecker/VersionCheckerPlugin.kt index a45ae8dd50..8347a45715 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/versionChecker/VersionCheckerPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/versionChecker/VersionCheckerPlugin.kt @@ -80,7 +80,6 @@ class VersionCheckerPlugin @Inject constructor( return } - if (isOldVersion(gracePeriod.warning.daysToMillis()) && shouldWarnAgain()) { // store last notification time sp.putLong(R.string.key_last_versionchecker_plugin_warning, now) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt index 7244b943f5..f7a13dca04 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt @@ -179,7 +179,6 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList carbAnimation?.setEnterFadeDuration(1200) carbAnimation?.setExitFadeDuration(1200) - binding.graphsLayout.bgGraph.setOnLongClickListener { overviewData.rangeToDisplay += 6 overviewData.rangeToDisplay = if (overviewData.rangeToDisplay > 24) 6 else overviewData.rangeToDisplay diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphExtensions/BolusDataPoint.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphExtensions/BolusDataPoint.kt index b9bbb79809..c354ad9fbb 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphExtensions/BolusDataPoint.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphExtensions/BolusDataPoint.kt @@ -34,8 +34,7 @@ class BolusDataPoint @Inject constructor( else if (data.isValid) rh.gac(context, R.attr.bolusDataPointColor) else rh.gac(context, R.attr.alarmColor) - override fun setY(y: Double) { yValue = y } -} \ No newline at end of file +} diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/Session.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/Session.kt index 7067ddd073..5fb6b34605 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/Session.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/Session.kt @@ -16,7 +16,6 @@ class Session(val authHeader: String?, @Volatile internal var iterations: Int = 0 - fun populateHeaders(headers: Headers) { if (this.token == null) { this.token = headers.get(sessionTokenHeader) @@ -39,4 +38,4 @@ class Session(val authHeader: String?, datasetReply = obj } } -} \ No newline at end of file +} diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/elements/ProfileElement.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/elements/ProfileElement.kt index c4f47e5aa3..12c7b55fd7 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/elements/ProfileElement.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/elements/ProfileElement.kt @@ -95,5 +95,3 @@ class ProfileElement(ps: EffectiveProfileSwitch, serialNumber: String, dateUtil: internal var amount: Double ) } - - diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/messages/DatasetReplyMessage.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/messages/DatasetReplyMessage.kt index f19070624b..9db4595c16 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/messages/DatasetReplyMessage.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/messages/DatasetReplyMessage.kt @@ -1,6 +1,5 @@ package info.nightscout.androidaps.plugins.general.tidepool.messages - class DatasetReplyMessage { internal var data: Data? = null diff --git a/app/src/main/java/info/nightscout/androidaps/receivers/DataReceiver.kt b/app/src/main/java/info/nightscout/androidaps/receivers/DataReceiver.kt index 6be6a5ad2e..1326ec68c7 100644 --- a/app/src/main/java/info/nightscout/androidaps/receivers/DataReceiver.kt +++ b/app/src/main/java/info/nightscout/androidaps/receivers/DataReceiver.kt @@ -28,7 +28,6 @@ open class DataReceiver : DaggerBroadcastReceiver() { val bundle = intent.extras ?: return aapsLogger.debug(LTag.DATABASE, "onReceive ${intent.action} ${BundleLogger.log(bundle)}") - when (intent.action) { Intents.ACTION_NEW_BG_ESTIMATE -> OneTimeWorkRequest.Builder(XdripPlugin.XdripWorker::class.java) @@ -71,4 +70,4 @@ open class DataReceiver : DaggerBroadcastReceiver() { }?.let { request -> dataWorker.enqueue(request) } } -} \ No newline at end of file +} diff --git a/app/src/test/java/info/nightscout/androidaps/queue/CommandQueueImplementationTest.kt b/app/src/test/java/info/nightscout/androidaps/queue/CommandQueueImplementationTest.kt index 1f49ca02a5..88b8075457 100644 --- a/app/src/test/java/info/nightscout/androidaps/queue/CommandQueueImplementationTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/queue/CommandQueueImplementationTest.kt @@ -299,7 +299,6 @@ class CommandQueueImplementationTest : TestBaseWithProfile() { Assert.assertFalse(commandQueue.isCustomCommandRunning(CustomCommand2::class.java)) Assert.assertFalse(commandQueue.isCustomCommandRunning(CustomCommand3::class.java)) - Assert.assertEquals(1, commandQueue.size()) } @@ -504,4 +503,4 @@ class CommandQueueImplementationTest : TestBaseWithProfile() { override val statusDescription: String get() = "CUSTOM COMMAND 3" } -} \ No newline at end of file +} diff --git a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionCarePortalEvent.kt b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionCarePortalEvent.kt index ba7385cc9b..d5f9e18caa 100644 --- a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionCarePortalEvent.kt +++ b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionCarePortalEvent.kt @@ -38,7 +38,6 @@ class ActionCarePortalEvent(injector: HasAndroidInjector) : Action(injector) { @Inject lateinit var glucoseStatusProvider: GlucoseStatusProvider @Inject lateinit var uel: UserEntryLogger - private val disposable = CompositeDisposable() var note = InputString() @@ -118,4 +117,4 @@ class ActionCarePortalEvent(injector: HasAndroidInjector) : Action(injector) { } override fun isValid(): Boolean = true -} \ No newline at end of file +} diff --git a/automation/src/test/java/info/nightscout/androidaps/plugins/general/automation/TestBase.kt b/automation/src/test/java/info/nightscout/androidaps/plugins/general/automation/TestBase.kt index b65690a315..5e27ece0c8 100644 --- a/automation/src/test/java/info/nightscout/androidaps/plugins/general/automation/TestBase.kt +++ b/automation/src/test/java/info/nightscout/androidaps/plugins/general/automation/TestBase.kt @@ -41,7 +41,6 @@ open class TestBase { return uninitialized() } - fun eqObject(expected: T): T { Mockito.eq(expected) return uninitialized() @@ -49,4 +48,4 @@ open class TestBase { @Suppress("Unchecked_Cast") fun uninitialized(): T = null as T -} \ No newline at end of file +} diff --git a/core/src/main/java/info/nightscout/androidaps/activities/NoSplashAppCompatActivity.kt b/core/src/main/java/info/nightscout/androidaps/activities/NoSplashAppCompatActivity.kt index 430c562448..eb93cbbc3c 100644 --- a/core/src/main/java/info/nightscout/androidaps/activities/NoSplashAppCompatActivity.kt +++ b/core/src/main/java/info/nightscout/androidaps/activities/NoSplashAppCompatActivity.kt @@ -8,7 +8,6 @@ import info.nightscout.androidaps.utils.locale.LocaleHelper import io.reactivex.rxjava3.disposables.CompositeDisposable import javax.inject.Inject - open class NoSplashAppCompatActivity : DaggerAppCompatActivityWithResult() { @Inject lateinit var rxBus: RxBus diff --git a/core/src/main/java/info/nightscout/androidaps/data/IobTotal.kt b/core/src/main/java/info/nightscout/androidaps/data/IobTotal.kt index 629eabe3b8..74bd1713b3 100644 --- a/core/src/main/java/info/nightscout/androidaps/data/IobTotal.kt +++ b/core/src/main/java/info/nightscout/androidaps/data/IobTotal.kt @@ -118,7 +118,6 @@ class IobTotal(val time: Long) : DataPointWithLabelInterface { return color } - fun setColor(color: Int): IobTotal { this.color = color return this @@ -141,4 +140,4 @@ class IobTotal(val time: Long) : DataPointWithLabelInterface { return result } } -} \ No newline at end of file +} diff --git a/core/src/main/java/info/nightscout/androidaps/extensions/Concurrency.kt b/core/src/main/java/info/nightscout/androidaps/extensions/Concurrency.kt index e0ecdf7f37..e1da1919a5 100644 --- a/core/src/main/java/info/nightscout/androidaps/extensions/Concurrency.kt +++ b/core/src/main/java/info/nightscout/androidaps/extensions/Concurrency.kt @@ -1,6 +1,5 @@ package info.nightscout.androidaps.extensions - @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN", "NOTHING_TO_INLINE") inline fun Any.wait() = (this as Object).wait() diff --git a/core/src/main/java/info/nightscout/androidaps/extensions/EffectiveProfileSwitchExtension.kt b/core/src/main/java/info/nightscout/androidaps/extensions/EffectiveProfileSwitchExtension.kt index 009f143aca..1384908c4d 100644 --- a/core/src/main/java/info/nightscout/androidaps/extensions/EffectiveProfileSwitchExtension.kt +++ b/core/src/main/java/info/nightscout/androidaps/extensions/EffectiveProfileSwitchExtension.kt @@ -49,7 +49,6 @@ fun effectiveProfileSwitchFromJson(jsonObject: JSONObject, dateUtil: DateUtil): val pureProfile = pureProfileFromJson(JSONObject(profileJson), dateUtil) ?: return null val profileSealed = ProfileSealed.Pure(pureProfile) - return EffectiveProfileSwitch( timestamp = timestamp, basalBlocks = profileSealed.basalBlocks, @@ -77,4 +76,4 @@ fun EffectiveProfileSwitch.GlucoseUnit.Companion.fromConstant(units: GlucoseUnit if (units == GlucoseUnit.MGDL) EffectiveProfileSwitch.GlucoseUnit.MGDL else EffectiveProfileSwitch.GlucoseUnit.MMOL -fun JSONObject.isEffectiveProfileSwitch() = has("originalProfileName") \ No newline at end of file +fun JSONObject.isEffectiveProfileSwitch() = has("originalProfileName") diff --git a/core/src/main/java/info/nightscout/androidaps/extensions/JSONObjectExt.kt b/core/src/main/java/info/nightscout/androidaps/extensions/JSONObjectExt.kt index 31ad6b567c..f4c9d40271 100644 --- a/core/src/main/java/info/nightscout/androidaps/extensions/JSONObjectExt.kt +++ b/core/src/main/java/info/nightscout/androidaps/extensions/JSONObjectExt.kt @@ -44,5 +44,3 @@ fun JSONObject.storeBoolean(@StringRes key: Int, sp: SP, rh: ResourceHelper): JS if (has(rh.gs(key))) sp.putString(key, getBoolean(rh.gs(key)).toString()) return this } - - diff --git a/core/src/main/java/info/nightscout/androidaps/extensions/OfflineEventExtension.kt b/core/src/main/java/info/nightscout/androidaps/extensions/OfflineEventExtension.kt index 152a3fcb1d..f55acc3675 100644 --- a/core/src/main/java/info/nightscout/androidaps/extensions/OfflineEventExtension.kt +++ b/core/src/main/java/info/nightscout/androidaps/extensions/OfflineEventExtension.kt @@ -49,7 +49,6 @@ fun offlineEventFromJson(jsonObject: JSONObject): OfflineEvent? { val reason = OfflineEvent.Reason.fromString(JsonHelper.safeGetString(jsonObject, "reason", OfflineEvent.Reason.OTHER.name)) - return OfflineEvent( timestamp = timestamp, duration = durationInMilliseconds ?: T.mins(duration).msecs(), @@ -62,5 +61,3 @@ fun offlineEventFromJson(jsonObject: JSONObject): OfflineEvent? { it.interfaceIDs.pumpSerial = pumpSerial } } - - diff --git a/core/src/main/java/info/nightscout/androidaps/extensions/ProfileSwitchExtension.kt b/core/src/main/java/info/nightscout/androidaps/extensions/ProfileSwitchExtension.kt index c612748869..c620493c58 100644 --- a/core/src/main/java/info/nightscout/androidaps/extensions/ProfileSwitchExtension.kt +++ b/core/src/main/java/info/nightscout/androidaps/extensions/ProfileSwitchExtension.kt @@ -84,7 +84,6 @@ fun profileSwitchFromJson(jsonObject: JSONObject, dateUtil: DateUtil, activePlug } else pureProfileFromJson(JSONObject(profileJson), dateUtil) ?: return null val profileSealed = ProfileSealed.Pure(pureProfile) - return ProfileSwitch( timestamp = timestamp, basalBlocks = profileSealed.basalBlocks, @@ -155,5 +154,3 @@ fun ProfileSwitch.getCustomizedName(): String { fun ProfileSwitch.GlucoseUnit.Companion.fromConstant(units: GlucoseUnit): ProfileSwitch.GlucoseUnit = if (units == GlucoseUnit.MGDL) ProfileSwitch.GlucoseUnit.MGDL else ProfileSwitch.GlucoseUnit.MMOL - - diff --git a/core/src/main/java/info/nightscout/androidaps/extensions/TherapyEventExtension.kt b/core/src/main/java/info/nightscout/androidaps/extensions/TherapyEventExtension.kt index c18ef9a31f..15cc907285 100644 --- a/core/src/main/java/info/nightscout/androidaps/extensions/TherapyEventExtension.kt +++ b/core/src/main/java/info/nightscout/androidaps/extensions/TherapyEventExtension.kt @@ -123,5 +123,3 @@ fun List.isTherapyEventEvent5minBack(time: Long): Boolean { } return false } - - diff --git a/core/src/main/java/info/nightscout/androidaps/utils/WarnColors.kt b/core/src/main/java/info/nightscout/androidaps/utils/WarnColors.kt index 477b092343..bde450ec77 100644 --- a/core/src/main/java/info/nightscout/androidaps/utils/WarnColors.kt +++ b/core/src/main/java/info/nightscout/androidaps/utils/WarnColors.kt @@ -11,7 +11,6 @@ import javax.inject.Singleton @Singleton class WarnColors @Inject constructor(val rh: ResourceHelper) { - fun setColor(view: TextView?, value: Double, warnLevel: Double, urgentLevel: Double) = view?.setTextColor( rh.gac( view.context ,when { value >= urgentLevel -> R.attr.urgentColor @@ -32,4 +31,4 @@ class WarnColors @Inject constructor(val rh: ResourceHelper) { therapyEvent.isOlderThan(warnThreshold) -> R.attr.highColor else -> R.attr.defaultTextColor })) -} \ No newline at end of file +} diff --git a/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgCheckValue_v2.kt b/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgCheckValue_v2.kt index 2fc6a4dcfc..4a04364a2c 100644 --- a/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgCheckValue_v2.kt +++ b/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgCheckValue_v2.kt @@ -14,7 +14,6 @@ class MsgCheckValue_v2( injector: HasAndroidInjector ) : MessageBase(injector) { - init { setCommand(0xF0F1) aapsLogger.debug(LTag.PUMPCOMM, "New message") @@ -64,4 +63,4 @@ class MsgCheckValue_v2( aapsLogger.debug(LTag.PUMPCOMM, "Protocol: " + String.format("%02X ", danaPump.protocol)) aapsLogger.debug(LTag.PUMPCOMM, "Product Code: " + String.format("%02X ", danaPump.productCode)) } -} \ No newline at end of file +} diff --git a/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingUserOptions.kt b/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingUserOptions.kt index c9fb98a7db..e8e602a338 100644 --- a/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingUserOptions.kt +++ b/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingUserOptions.kt @@ -7,7 +7,6 @@ class MsgSettingUserOptions( injector: HasAndroidInjector ) : MessageBase(injector) { - init { setCommand(0x320B) aapsLogger.debug(LTag.PUMPCOMM, "New message") @@ -50,4 +49,4 @@ class MsgSettingUserOptions( System.arraycopy(bytes, 6, ret, 0, len) return ret } -} \ No newline at end of file +} diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Plugin.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Plugin.kt index 713495bf47..518d31b723 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Plugin.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Plugin.kt @@ -139,7 +139,6 @@ class DiaconnG8Plugin @Inject constructor( override fun isConnecting(): Boolean = diaconnG8Service?.isConnecting ?: false override fun isHandshakeInProgress(): Boolean = false - override fun disconnect(reason: String) { aapsLogger.debug(LTag.PUMP, "Diaconn G8 disconnect from: $reason") diaconnG8Service?.disconnect(reason) @@ -248,7 +247,6 @@ class DiaconnG8Plugin @Inject constructor( override val batteryLevel: Int get() = diaconnG8Pump.systemRemainBattery - @Synchronized override fun deliverTreatment(detailedBolusInfo: DetailedBolusInfo): PumpEnactResult { detailedBolusInfo.insulin = constraintChecker.applyBolusConstraints(Constraint(detailedBolusInfo.insulin)).value() diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Pump.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Pump.kt index b20a9555ed..61d15fc0a6 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Pump.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Pump.kt @@ -1,6 +1,5 @@ package info.nightscout.androidaps.diaconn - import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.shared.logging.AAPSLogger @@ -54,12 +53,10 @@ class DiaconnG8Pump @Inject constructor( var basalStep = 0.01 var iob = 0.0 - var bolusBlocked = false var lastBolusTime: Long = 0 var lastBolusAmount = 0.0 - /* * TEMP BASALS */ @@ -233,7 +230,6 @@ class DiaconnG8Pump @Inject constructor( var minute = 0 // 분 (0~59) var second = 0 // 초 (0~59) - // 4. pump system info var country = 0 // 생산국(K, C), ASCII var productType = 0 // 제품종류(A ~ Z), ASCII @@ -269,7 +265,6 @@ class DiaconnG8Pump @Inject constructor( var baseAmount = 0.0 // 주입설정량(량*100, 23.25->2325, 15.2->1520) var baseInjAmount = 0.0 // 현재주입량(량*100, 23.25->2325, 15.2->1520) - // 9. meal bolus status var mealKind = 0 // 주입종류(1=아침,2=점심,3=저녁) var mealStartTime = 0 // 식사주입 시작시간(time_t) @@ -278,14 +273,12 @@ class DiaconnG8Pump @Inject constructor( var mealInjAmount = 0.0 // 현재주입량(량*100, 23.25->2325, 15.2->1520) var mealSpeed = 0 // 주입속도(1~8) - // 10. snack bolus status var snackStatus = 0 // 주입상태(1=주입중,2=주입상태아님) var snackAmount = 0.0 // 주입설정량(량*100, 23.25->2325, 15.2->1520) var snackInjAmount = 0.0 // 현재주입량(량*100, 23.25->2325, 15.2->1520) var snackSpeed = 0 // 주입속도(1~8) - // 11. square(extended) bolus status var squareStatus = 0 // 주입상태 var squareTime = 0 // 설정 주입시간(10~300분) @@ -293,7 +286,6 @@ class DiaconnG8Pump @Inject constructor( var squareAmount = 0.0 // 주입 설정량 var squareInjAmount = 0.0 // 현재 주입량 - // 12. daul bolus status var dualStatus = 0 // 주입상태 var dualAmount = 0.0 // 일반주입 설정량 @@ -303,7 +295,6 @@ class DiaconnG8Pump @Inject constructor( var dualSquareAmount = 0.0 // 스퀘어주입 설정량 var dualInjSquareAmount = 0.0 // 스퀘어주입량 - // 13. last injection status var recentKind1 = 0 // 최근-1 주입 종류(1=식사, 2=일반간식, 3=스퀘어회식, 4=더블회식) var recentTime1 = 0 // 최근-1 주입 시간 @@ -312,13 +303,11 @@ class DiaconnG8Pump @Inject constructor( var recentTime2 = 0 // 최근-2 주입 시간 var recentAmount2 = 0.0 // 최근-2 주입량 - // 14. daily injection status var todayBaseAmount = 0.0 // 기저주입 총량 var todayMealAmount = 0.0 // 식사주입 총량 var todaySnackAmount = 0.0 // 회식주입 총량 - // 15. meat setting status var morningHour = 0 // 아침 개시 시간(0~23) var morningAmount = 0.0 // 아침 식전량 @@ -327,14 +316,12 @@ class DiaconnG8Pump @Inject constructor( var dinnerHour = 0 // 저녁 개시 시간(0~23) var dinnerAmount = 0.0 // 저녁 식전량 - // 16. basal injection status at this hour var currentBasePattern = 0 // 패턴 종류 (1=기본, 2=생활1, 3=생활2, 4=생활3, 5=닥터1, 6=닥터2) var currentBaseHour = 0 // 현재주입시간(0~23) var currentBaseTbBeforeAmount = 0.0 // 해당시간의 임시기저 계산 전 기저주입량: 기저주입막힘 발생 시 기저주입 막힘량 제외, 기저정지로 인해 주입되지 않은 량 제외, 리셋으로 인해 주입되지 않은 량 제외(47.5=4750) var currentBaseTbAfterAmount = 0.0 // 해당시간의 임시기저 계산 후 기저주입량: 기저주입막힘 발생 시 기저주입 막힘량 제외, 기저정지로 인해 주입되지 않은 량 제외, 리셋으로 인해 주입되지 않은 량 제외(47.5=4750) - // 17. saved basal pattern status var baseAmount1 = 0.00// 주입량 1(량*100, 23.25->2325, 15.2->1520) var baseAmount2 = 0.0// 주입량 2(량*100, 23.25->2325, 15.2->1520) @@ -371,4 +358,4 @@ class DiaconnG8Pump @Inject constructor( const val BOLUS_SPEED = 3 } -} \ No newline at end of file +} diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/di/DiaconnG8PacketModule.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/di/DiaconnG8PacketModule.kt index 8a661ed7a7..86a27374ce 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/di/DiaconnG8PacketModule.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/di/DiaconnG8PacketModule.kt @@ -79,5 +79,4 @@ abstract class DiaconnG8PacketModule { @ContributesAndroidInjector abstract fun contributesBigAPSMainInfoInquireResponsePacket(): BigAPSMainInfoInquireResponsePacket - -} \ No newline at end of file +} diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppCancelSettingResponsePacket.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppCancelSettingResponsePacket.kt index eaceadc8ee..70ae0f6688 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppCancelSettingResponsePacket.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppCancelSettingResponsePacket.kt @@ -37,8 +37,7 @@ class AppCancelSettingResponsePacket( aapsLogger.debug(LTag.PUMPCOMM, "Result --> ${result}") } - override fun getFriendlyName(): String { return "PUMP_APP_CANCEL_SETTING_RESPONSE" } -} \ No newline at end of file +} diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigLogInquireResponsePacket.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigLogInquireResponsePacket.kt index 8e8a7d40c0..5ca09ea8e7 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigLogInquireResponsePacket.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigLogInquireResponsePacket.kt @@ -449,7 +449,6 @@ class BigLogInquireResponsePacket( aapsLogger.debug(LTag.PUMPCOMM, (if (newRecord) "**NEW** " else "") + "EVENT TUBECHANGE(" + pumplogKind + ") " + dateUtil.dateAndTimeString(logDateTime) + " (" + logDateTime + ")" + " Amount: " + logItem.primeAmount / 100.0 + "U") } - diaconnG8HistoryRecord.code = RecordTypes.RECORD_TYPE_REFILL diaconnG8HistoryRecord.timestamp = logDateTime diaconnG8HistoryRecord.value = logItem.remainAmount / 100.0 @@ -549,7 +548,6 @@ class BigLogInquireResponsePacket( // diaconnG8Pump.serialNo.toString() // ) - status = "DAILYBASAL " + dateUtil.timeString(logDateTime) } @@ -635,7 +633,6 @@ class BigLogInquireResponsePacket( pumpSerial = diaconnG8Pump.serialNo.toString()) aapsLogger.debug(LTag.PUMPCOMM, (if (newRecord) "**NEW** " else "") + "EVENT TEMPSTOP (" + pumplogKind + ") " + dateUtil.dateAndTimeString(logDateTime) + " (" + logDateTime + ")") - diaconnG8HistoryRecord.code = RecordTypes.RECORD_TYPE_TB diaconnG8HistoryRecord.timestamp = logDateTime diaconnG8HistoryRecord.value = absoluteRate @@ -784,4 +781,4 @@ class BigLogInquireResponsePacket( } } -} \ No newline at end of file +} diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DiaconnG8ResponseMessageHashTable.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DiaconnG8ResponseMessageHashTable.kt index 5c6c984e14..7248d73530 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DiaconnG8ResponseMessageHashTable.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DiaconnG8ResponseMessageHashTable.kt @@ -35,7 +35,6 @@ class DiaconnG8ResponseMessageHashTable @Inject constructor(val injector: HasAnd put(DisplayTimeInquireResponsePacket(injector)) put(LanguageInquireResponsePacket(injector)) - // Report Packet put(BasalPauseReportPacket(injector)) put(BasalSettingReportPacket(injector)) diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeInquireResponsePacket.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeInquireResponsePacket.kt index 85e12cdb89..6e318e3421 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeInquireResponsePacket.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeInquireResponsePacket.kt @@ -34,7 +34,6 @@ class DisplayTimeInquireResponsePacket(injector: HasAndroidInjector) : DiaconnG8 diaconnG8Pump.lcdOnTimeSec = getByteToInt(bufferData) - aapsLogger.debug(LTag.PUMPCOMM, "Result --> ${diaconnG8Pump.result}") aapsLogger.debug(LTag.PUMPCOMM, "lcdOnTimeSec --> ${diaconnG8Pump.lcdOnTimeSec}") } @@ -42,4 +41,4 @@ class DisplayTimeInquireResponsePacket(injector: HasAndroidInjector) : DiaconnG8 override fun getFriendlyName(): String { return "PUMP_DISPLAY_TIME_INQUIRE_RESPONSE" } -} \ No newline at end of file +} diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageInquireResponsePacket.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageInquireResponsePacket.kt index 405aa8092a..48f631b608 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageInquireResponsePacket.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageInquireResponsePacket.kt @@ -33,7 +33,6 @@ class LanguageInquireResponsePacket(injector: HasAndroidInjector) : DiaconnG8Pac } diaconnG8Pump.selectedLanguage = getByteToInt(bufferData) - aapsLogger.debug(LTag.PUMPCOMM, "Result --> ${diaconnG8Pump.result}") aapsLogger.debug(LTag.PUMPCOMM, "selectedLanguage --> ${diaconnG8Pump.selectedLanguage}") } @@ -41,4 +40,4 @@ class LanguageInquireResponsePacket(injector: HasAndroidInjector) : DiaconnG8Pac override fun getFriendlyName(): String { return "PUMP_LANGUAGE_INQUIRE_RESPONSE" } -} \ No newline at end of file +} diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SneckLimitInquireResponsePacket.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SneckLimitInquireResponsePacket.kt index 7386bcb47f..4bead0560c 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SneckLimitInquireResponsePacket.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SneckLimitInquireResponsePacket.kt @@ -35,7 +35,6 @@ class SneckLimitInquireResponsePacket(injector: HasAndroidInjector) : DiaconnG8P diaconnG8Pump.maxBolus = getShortToInt(bufferData).toDouble() / 100 diaconnG8Pump.maxBolusePerDay = getShortToInt(bufferData).toDouble() / 100 - aapsLogger.debug(LTag.PUMPCOMM, "Result --> ${diaconnG8Pump.result}") aapsLogger.debug(LTag.PUMPCOMM, "maxBolusePerDay --> ${diaconnG8Pump.maxBolusePerDay}") aapsLogger.debug(LTag.PUMPCOMM, "maxBolus --> ${diaconnG8Pump.maxBolus}") @@ -44,4 +43,4 @@ class SneckLimitInquireResponsePacket(injector: HasAndroidInjector) : DiaconnG8P override fun getFriendlyName(): String { return "PUMP_SNACK_LIMIT_INQUIRE_RESPONSE" } -} \ No newline at end of file +} diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundInquireResponsePacket.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundInquireResponsePacket.kt index 278d20bef6..f5a9992ba8 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundInquireResponsePacket.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundInquireResponsePacket.kt @@ -35,7 +35,6 @@ class SoundInquireResponsePacket(injector: HasAndroidInjector) : DiaconnG8Packet diaconnG8Pump.beepAndAlarm = getByteToInt(bufferData) -1 diaconnG8Pump.alarmIntesity = getByteToInt(bufferData) -1 - aapsLogger.debug(LTag.PUMPCOMM, "Result --> ${diaconnG8Pump.result}") aapsLogger.debug(LTag.PUMPCOMM, "beepAndAlarm --> ${diaconnG8Pump.beepAndAlarm}") aapsLogger.debug(LTag.PUMPCOMM, "alarmIntesity --> ${diaconnG8Pump.alarmIntesity}") @@ -44,4 +43,4 @@ class SoundInquireResponsePacket(injector: HasAndroidInjector) : DiaconnG8Packet override fun getFriendlyName(): String { return "PUMP_SOUND_INQUIRE_RESPONSE" } -} \ No newline at end of file +} diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/BLECommonService.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/BLECommonService.kt index 9e059045ea..4cff23153c 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/BLECommonService.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/BLECommonService.kt @@ -48,7 +48,6 @@ class BLECommonService @Inject internal constructor( private var connectDeviceName: String? = null private var bluetoothGatt: BluetoothGatt? = null - var isConnected = false var isConnecting = false private var uartIndicate: BluetoothGattCharacteristic? = null diff --git a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicCommunicationManager.kt b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicCommunicationManager.kt index df7b35a979..391a0771ca 100644 --- a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicCommunicationManager.kt +++ b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicCommunicationManager.kt @@ -534,7 +534,6 @@ class MedtronicCommunicationManager // This empty constructor must be kept, oth errorResponse = check } - aapsLogger.debug(LTag.PUMPCOMM, "End Response: {}", ByteUtil.getHex(data)) val basalProfile: BasalProfile? = medtronicConverter.decodeBasalProfile(medtronicPumpPlugin.pumpDescription.pumpType, data) @@ -692,4 +691,4 @@ class MedtronicCommunicationManager // This empty constructor must be kept, oth } return false } -} \ No newline at end of file +} diff --git a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt index b8a2d50dee..cfc7b95da6 100644 --- a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt +++ b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt @@ -641,7 +641,6 @@ class MedtronicHistoryData @Inject constructor( "pumpId=${tempBasalProcessDTO.pumpId}, pumpType=${medtronicPumpStatus.pumpType}, " + "pumpSerial=${medtronicPumpStatus.serialNumber}]") - if (tempBasalProcessDTO.durationAsSeconds <= 0) { rxBus.send(EventNewNotification(Notification(Notification.MDT_INVALID_HISTORY_DATA, rh.gs(R.string.invalid_history_data), Notification.URGENT))) aapsLogger.debug(LTag.PUMP, "syncTemporaryBasalWithPumpId - Skipped") @@ -799,7 +798,6 @@ class MedtronicHistoryData @Inject constructor( return processList } - fun isTBRActive(dbEntry: PumpDbEntryTBR): Boolean { return isTBRActive( startTimestamp = dbEntry.date, @@ -1225,4 +1223,4 @@ class MedtronicHistoryData @Inject constructor( const val doubleBolusDebug = false } -} \ No newline at end of file +} diff --git a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BasalProfileEntry.kt b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BasalProfileEntry.kt index 03c270246e..b1f642162a 100644 --- a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BasalProfileEntry.kt +++ b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BasalProfileEntry.kt @@ -64,5 +64,4 @@ class BasalProfileEntry { startTime = LocalTime(startTimeByte / 2, startTimeByte % 2 * 30) } - -} \ No newline at end of file +} diff --git a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BatteryStatusDTO.kt b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BatteryStatusDTO.kt index 60128d51a5..88afa87106 100644 --- a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BatteryStatusDTO.kt +++ b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BatteryStatusDTO.kt @@ -16,7 +16,6 @@ class BatteryStatusDTO { var extendedDataReceived = false - fun getCalculatedPercent(batteryType: BatteryType): Int { if (voltage == null || batteryType === BatteryType.None) { return if (batteryStatusType == BatteryStatusType.Low || batteryStatusType == BatteryStatusType.Unknown) 18 else 70 @@ -28,7 +27,6 @@ class BatteryStatusDTO { return percentInt } - override fun toString(): String { return String.format(Locale.ENGLISH, "BatteryStatusDTO [voltage=%.2f, alkaline=%d, lithium=%d, niZn=%d, nimh=%d]", if (voltage == null) 0.0f else voltage, @@ -43,4 +41,4 @@ class BatteryStatusDTO { Low, Unknown } -} \ No newline at end of file +} diff --git a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BolusWizardDTO.kt b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BolusWizardDTO.kt index cf73a0506d..43cdee1c0f 100644 --- a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BolusWizardDTO.kt +++ b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BolusWizardDTO.kt @@ -21,7 +21,6 @@ class BolusWizardDTO : PumpTimeStampedRecord() { var foodEstimate = 0.0f var unabsorbedInsulin = 0.0f// - val value: String get() = String.format(Locale.ENGLISH, "BG=%d;CH=%d;CH_UNIT=%s;CH_INS_RATIO=%5.3f;BG_INS_RATIO=%5.3f;" + "BG_TARGET_LOW=%d;BG_TARGET_HIGH=%d;BOLUS_TOTAL=%5.3f;" @@ -41,4 +40,4 @@ class BolusWizardDTO : PumpTimeStampedRecord() { override fun toString(): String { return "BolusWizardDTO [dateTime=" + DateTimeUtil.toString(atechDateTime) + ", " + value + "]" } -} \ No newline at end of file +} diff --git a/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/MedtronicPumpHistoryDecoderUTest.kt b/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/MedtronicPumpHistoryDecoderUTest.kt index 9820362dc7..89130376b9 100644 --- a/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/MedtronicPumpHistoryDecoderUTest.kt +++ b/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/MedtronicPumpHistoryDecoderUTest.kt @@ -62,7 +62,6 @@ class MedtronicPumpHistoryDecoderUTest : TestBase() { } - // @Test public void decodeLowAmount() { byte[] data = new byte[] { 52, -12, 22, -81, 46, 3, 19 }; @@ -81,7 +80,6 @@ class MedtronicPumpHistoryDecoderUTest : TestBase() { } - // @Test public void decodeDailyTotals522() { // PumpHistoryRecord [type=DailyTotals522 [109, 0x6D], DT: 01.11.2018 00:00:00, length=1,2,41(44), data={Raw @@ -105,7 +103,6 @@ class MedtronicPumpHistoryDecoderUTest : TestBase() { } - // @Test public void decodeDailyTotals515() { @@ -126,7 +123,6 @@ class MedtronicPumpHistoryDecoderUTest : TestBase() { } - // @Test public void decodeDailyTotals523() { @@ -149,7 +145,6 @@ class MedtronicPumpHistoryDecoderUTest : TestBase() { } - private void testRecord(byte[] data) { // byte[] data = new byte[] { 0x07, 0x00, 0x00, 0x05, (byte)0xFA, (byte)0xBF, 0x12 }; @@ -214,4 +209,4 @@ class MedtronicPumpHistoryDecoderUTest : TestBase() { aapsLogger.debug(pumpHistoryEntry.toString()) } } -} \ No newline at end of file +} diff --git a/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryDataUTest.kt b/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryDataUTest.kt index e90d6aa675..7b093e3a5b 100644 --- a/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryDataUTest.kt +++ b/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryDataUTest.kt @@ -34,7 +34,6 @@ class MedtronicHistoryDataUTest : TestBase() { @Mock lateinit var rh: ResourceHelper @Mock lateinit var rxBus: RxBus - private val packetInjector = HasAndroidInjector { AndroidInjector { @@ -42,7 +41,6 @@ class MedtronicHistoryDataUTest : TestBase() { } - @Test fun createTBRProcessList() { @@ -52,7 +50,6 @@ class MedtronicHistoryDataUTest : TestBase() { pumpSync, pumpSyncStorage) - val gson = Gson() val fileText = ClassLoader.getSystemResource("tbr_data.json").readText() @@ -85,7 +82,6 @@ class MedtronicHistoryDataUTest : TestBase() { } - @Test fun createTBRProcessList_SpecialCase() { @@ -95,7 +91,6 @@ class MedtronicHistoryDataUTest : TestBase() { pumpSync, pumpSyncStorage) - val gson = Gson() val fileText = ClassLoader.getSystemResource("tbr_data_special.json").readText() @@ -128,5 +123,4 @@ class MedtronicHistoryDataUTest : TestBase() { } - -} \ No newline at end of file +} diff --git a/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/dagger/OmnipodWizardModule.kt b/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/dagger/OmnipodWizardModule.kt index 889ac70ea5..4c4d1e3643 100644 --- a/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/dagger/OmnipodWizardModule.kt +++ b/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/dagger/OmnipodWizardModule.kt @@ -74,5 +74,3 @@ abstract class OmnipodWizardModule { internal abstract fun contributesPodDiscardedFragment(): PodDiscardedFragment } - - diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpDbEntry.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpDbEntry.kt index 019b217aea..e208a22d6e 100644 --- a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpDbEntry.kt +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpDbEntry.kt @@ -40,7 +40,6 @@ import info.nightscout.androidaps.plugins.pump.common.defs.PumpType // // } - interface PumpDbEntry { var temporaryId: Long var date: Long @@ -50,7 +49,6 @@ interface PumpDbEntry { } - data class PumpDbEntryBolus(override var temporaryId: Long, override var date: Long, override var pumpType: PumpType, @@ -109,4 +107,4 @@ data class PumpDbEntryTBR(override var temporaryId: Long, ) : this(temporaryId, date, pumpType, serialNumber, pumpId, entry.rate, entry.isAbsolute, entry.durationInSeconds, entry.tbrType) -} \ No newline at end of file +} diff --git a/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/dialog/RileyLinkBLEConfigActivity.kt b/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/dialog/RileyLinkBLEConfigActivity.kt index ba7a5c4344..a07bae6138 100644 --- a/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/dialog/RileyLinkBLEConfigActivity.kt +++ b/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/dialog/RileyLinkBLEConfigActivity.kt @@ -144,7 +144,6 @@ class RileyLinkBLEConfigActivity : DaggerAppCompatActivity() { } } - override fun onOptionsItemSelected(item: MenuItem): Boolean = when (item.itemId) { android.R.id.home -> { @@ -304,4 +303,5 @@ class RileyLinkBLEConfigActivity : DaggerAppCompatActivity() { private const val SCAN_PERIOD_MILLIS: Long = 15000 } -} \ No newline at end of file + +}