diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/FillDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/FillDialog.kt index 08bec3cf63..13d6b4970a 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/FillDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/FillDialog.kt @@ -7,7 +7,7 @@ import android.view.View import android.view.ViewGroup import com.google.common.base.Joiner import info.nightscout.androidaps.R -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.transactions.InsertIfNewByTimestampTherapyEventTransaction import info.nightscout.androidaps.databinding.DialogFillBinding diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/InsulinDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/InsulinDialog.kt index 85ce90fa01..4da736be18 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/InsulinDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/InsulinDialog.kt @@ -9,9 +9,6 @@ import android.view.View import android.view.ViewGroup import com.google.common.base.Joiner import info.nightscout.androidaps.R -import info.nightscout.androidaps.data.DetailedBolusInfo -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction import info.nightscout.androidaps.databinding.DialogInsulinBinding import info.nightscout.androidaps.extensions.formatColor import info.nightscout.androidaps.interfaces.ActivePlugin @@ -27,15 +24,19 @@ import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.extensions.toSignedString import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BOLUS +import info.nightscout.core.pumpExtensions.insertBolusTransaction import info.nightscout.database.entities.TemporaryTarget import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources import info.nightscout.database.entities.ValueWithUnit +import info.nightscout.database.impl.AppRepository +import info.nightscout.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction import info.nightscout.interfaces.ActivityNames import info.nightscout.interfaces.BolusTimer import info.nightscout.interfaces.Config import info.nightscout.interfaces.Constraint import info.nightscout.interfaces.GlucoseUnit +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.interfaces.queue.Callback import info.nightscout.interfaces.utils.HtmlHelper import info.nightscout.rx.logging.LTag diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/LoopDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/LoopDialog.kt index 5ce44dc903..73d6a1c4e1 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/LoopDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/LoopDialog.kt @@ -38,7 +38,7 @@ import info.nightscout.interfaces.ConfigBuilder import info.nightscout.interfaces.Constraint import info.nightscout.interfaces.PluginBase import info.nightscout.interfaces.PluginType -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.interfaces.queue.Callback import info.nightscout.rx.bus.RxBus import info.nightscout.rx.events.EventRefreshOverview diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/TempBasalDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/TempBasalDialog.kt index 4cc9372866..ed6322fbc8 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/TempBasalDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/TempBasalDialog.kt @@ -24,7 +24,7 @@ import info.nightscout.database.entities.UserEntry.Sources import info.nightscout.database.entities.ValueWithUnit import info.nightscout.interfaces.ActivityNames import info.nightscout.interfaces.Constraint -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.interfaces.queue.Callback import info.nightscout.interfaces.utils.HtmlHelper import info.nightscout.rx.logging.LTag diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/TreatmentDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/TreatmentDialog.kt index 5d899aaa02..397a10bbe0 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/TreatmentDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/TreatmentDialog.kt @@ -9,8 +9,6 @@ import android.view.View import android.view.ViewGroup import com.google.common.base.Joiner import info.nightscout.androidaps.R -import info.nightscout.androidaps.data.DetailedBolusInfo -import info.nightscout.database.impl.AppRepository import info.nightscout.androidaps.databinding.DialogTreatmentBinding import info.nightscout.androidaps.extensions.formatColor import info.nightscout.androidaps.interfaces.ActivePlugin @@ -22,12 +20,16 @@ import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BOLUS +import info.nightscout.core.pumpExtensions.insertBolusTransaction +import info.nightscout.core.pumpExtensions.insertCarbsTransaction import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources import info.nightscout.database.entities.ValueWithUnit +import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.ActivityNames import info.nightscout.interfaces.Config import info.nightscout.interfaces.Constraint +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.interfaces.queue.Callback import info.nightscout.interfaces.utils.HtmlHelper import info.nightscout.rx.logging.LTag diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt index f5d71a1f49..d19e234bc2 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt @@ -16,7 +16,7 @@ import info.nightscout.androidaps.BuildConfig import info.nightscout.androidaps.MainActivity import info.nightscout.androidaps.R import info.nightscout.androidaps.annotations.OpenForTesting -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.ValueWrapper @@ -56,7 +56,7 @@ import info.nightscout.interfaces.PluginBase import info.nightscout.interfaces.PluginDescription import info.nightscout.interfaces.PluginType import info.nightscout.interfaces.notifications.Notification -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.interfaces.queue.Callback import info.nightscout.plugins.configBuilder.RunningConfiguration import info.nightscout.plugins.pump.virtual.VirtualPumpPlugin diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPlugin.kt index f1f0da7ed2..a1c5025ef8 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPlugin.kt @@ -18,7 +18,7 @@ import info.nightscout.interfaces.PluginBase import info.nightscout.interfaces.PluginDescription import info.nightscout.interfaces.PluginType import info.nightscout.androidaps.interfaces.Profile -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.interfaces.Safety import info.nightscout.androidaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin 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 9edba3b27b..2bf9222da3 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 @@ -84,7 +84,7 @@ import info.nightscout.interfaces.Constants import info.nightscout.interfaces.Constraint import info.nightscout.interfaces.GlucoseUnit import info.nightscout.interfaces.PluginBase -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.utils.JsonHelper import info.nightscout.plugins.constraints.bgQualityCheck.BgQualityCheckPlugin import info.nightscout.plugins.general.overview.notifications.NotificationStore diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatusLightHandler.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatusLightHandler.kt index 7d41714441..f503b2090a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatusLightHandler.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatusLightHandler.kt @@ -11,7 +11,7 @@ import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.WarnColors import info.nightscout.database.entities.TherapyEvent import info.nightscout.interfaces.Config -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.plugins.sync.nsclient.extensions.age import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.sharedPreferences.SP diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataHandlerMobile.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataHandlerMobile.kt index 965ddc4426..4e89584e82 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataHandlerMobile.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataHandlerMobile.kt @@ -4,7 +4,7 @@ import android.app.NotificationManager import android.content.Context import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.ValueWrapper import info.nightscout.database.impl.transactions.CancelCurrentTemporaryTargetIfAnyTransaction diff --git a/app/src/main/java/info/nightscout/androidaps/utils/wizard/BolusWizard.kt b/app/src/main/java/info/nightscout/androidaps/utils/wizard/BolusWizard.kt index f0c350bc21..d60de392db 100644 --- a/app/src/main/java/info/nightscout/androidaps/utils/wizard/BolusWizard.kt +++ b/app/src/main/java/info/nightscout/androidaps/utils/wizard/BolusWizard.kt @@ -5,7 +5,7 @@ import android.text.Spanned import com.google.common.base.Joiner import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.transactions.InsertOrUpdateBolusCalculatorResultTransaction import info.nightscout.androidaps.extensions.formatColor @@ -35,7 +35,7 @@ import info.nightscout.interfaces.CarbTimer import info.nightscout.interfaces.Config import info.nightscout.interfaces.Constraint import info.nightscout.interfaces.PluginBase -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.interfaces.queue.Callback import info.nightscout.interfaces.utils.HtmlHelper import info.nightscout.interfaces.utils.Round diff --git a/app/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt b/app/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt index 6d317c2037..257a6c9c02 100644 --- a/app/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt +++ b/app/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt @@ -1,15 +1,15 @@ package info.nightscout.androidaps import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.interfaces.data.PumpEnactResult import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.Pump -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.interfaces.pump.ManufacturerType -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.ManufacturerType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.utils.TimeChangeType import org.json.JSONObject diff --git a/app/src/test/java/info/nightscout/androidaps/interfaces/ConstraintsCheckerTest.kt b/app/src/test/java/info/nightscout/androidaps/interfaces/ConstraintsCheckerTest.kt index 0aa5358c57..d580768504 100644 --- a/app/src/test/java/info/nightscout/androidaps/interfaces/ConstraintsCheckerTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/interfaces/ConstraintsCheckerTest.kt @@ -35,7 +35,7 @@ import info.nightscout.interfaces.BuildHelper import info.nightscout.interfaces.Constraint import info.nightscout.interfaces.PluginBase import info.nightscout.interfaces.PluginType -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.plugins.pump.virtual.VirtualPumpPlugin import info.nightscout.shared.sharedPreferences.SP import org.junit.Assert diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt index 6e43a490ca..4f23e8ab06 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt @@ -18,7 +18,7 @@ import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.interfaces.ActivityNames import info.nightscout.interfaces.Config import info.nightscout.interfaces.PluginType -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.plugins.configBuilder.RunningConfiguration import info.nightscout.plugins.pump.virtual.VirtualPumpPlugin import info.nightscout.rx.bus.RxBus diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPluginTest.kt index a4d6fd6682..bcc97f28eb 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPluginTest.kt @@ -8,7 +8,7 @@ import info.nightscout.database.impl.AppRepository import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.interfaces.Constraint import info.nightscout.androidaps.interfaces.Constraints -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.androidaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin import info.nightscout.androidaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin import info.nightscout.androidaps.plugins.aps.openAPSSMBDynamicISF.OpenAPSSMBDynamicISFPlugin diff --git a/app/src/test/java/info/nightscout/androidaps/utils/wizard/BolusWizardTest.kt b/app/src/test/java/info/nightscout/androidaps/utils/wizard/BolusWizardTest.kt index 0e83d9f605..7efdc68d4c 100644 --- a/app/src/test/java/info/nightscout/androidaps/utils/wizard/BolusWizardTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/utils/wizard/BolusWizardTest.kt @@ -14,7 +14,7 @@ import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensDataStore import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.plugins.pump.virtual.VirtualPumpPlugin diff --git a/automation/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt b/automation/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt index deebd4bb08..b367dbc15c 100644 --- a/automation/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt +++ b/automation/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt @@ -1,18 +1,18 @@ package info.nightscout.androidaps import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.interfaces.data.PumpEnactResult import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.interfaces.PluginBase import info.nightscout.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.Pump -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.shared.interfaces.ResourceHelper -import info.nightscout.interfaces.pump.ManufacturerType -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.ManufacturerType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.utils.TimeChangeType import info.nightscout.rx.logging.AAPSLogger import org.json.JSONObject diff --git a/build.gradle b/build.gradle index 7b491b8202..870fdd0d11 100644 --- a/build.gradle +++ b/build.gradle @@ -70,7 +70,7 @@ plugins { id "io.gitlab.arturbosch.detekt" version "1.21.0" id "org.jlleitschuh.gradle.ktlint" version "11.0.0" id 'org.barfuin.gradle.jacocolog' version '2.0.0' - id 'org.jetbrains.kotlin.android' version '1.7.21' apply false + id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false } allprojects { diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/CommandQueue.kt b/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/CommandQueue.kt index 672a825cdb..20cf7988e3 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/CommandQueue.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/CommandQueue.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.interfaces import android.text.Spanned -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.interfaces.queue.Callback import info.nightscout.androidaps.queue.commands.Command import info.nightscout.interfaces.queue.CustomCommand diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/Pump.kt b/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/Pump.kt index c1f06346e8..ed84388ac4 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/Pump.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/Pump.kt @@ -1,10 +1,10 @@ package info.nightscout.androidaps.interfaces -import info.nightscout.androidaps.data.DetailedBolusInfo -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.DetailedBolusInfo +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.data.PumpEnactResult -import info.nightscout.interfaces.pump.ManufacturerType -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.ManufacturerType +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.interfaces.pump.actions.CustomAction import info.nightscout.interfaces.pump.actions.CustomActionType import info.nightscout.interfaces.queue.CustomCommand diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/PumpSync.kt b/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/PumpSync.kt index 3dde921289..4d5d7907a3 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/PumpSync.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/PumpSync.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.interfaces -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.database.entities.TemporaryBasal -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType /** * This interface allows pump drivers to push data changes (creation and update of treatments, temporary basals and extended boluses) back to AAPS-core. diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/plugins/aps/loop/APSResult.kt b/core/core-main/src/main/java/info/nightscout/androidaps/plugins/aps/loop/APSResult.kt index f1c9096f8b..598bfe2953 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/plugins/aps/loop/APSResult.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/plugins/aps/loop/APSResult.kt @@ -13,7 +13,7 @@ import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.core.main.R import info.nightscout.database.entities.GlucoseValue import info.nightscout.interfaces.Constraint -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.interfaces.utils.HtmlHelper.fromHtml import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/plugins/pump/common/bolusInfo/DetailedBolusInfoStorage.kt b/core/core-main/src/main/java/info/nightscout/androidaps/plugins/pump/common/bolusInfo/DetailedBolusInfoStorage.kt index 4c97446250..e9579764c2 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/plugins/pump/common/bolusInfo/DetailedBolusInfoStorage.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/plugins/pump/common/bolusInfo/DetailedBolusInfoStorage.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.plugins.pump.common.bolusInfo import info.nightscout.androidaps.annotations.OpenForTesting -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.core.pumpExtensions.toJsonString +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.shared.utils.T import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag @@ -19,7 +20,7 @@ class DetailedBolusInfoStorage @Inject constructor( @Synchronized fun add(detailedBolusInfo: DetailedBolusInfo) { - aapsLogger.debug("Stored bolus info: $detailedBolusInfo") + aapsLogger.debug("Stored bolus info: ${detailedBolusInfo.toJsonString()}") store.add(detailedBolusInfo) } diff --git a/core/core-main/src/main/java/info/nightscout/core/pumpExtensions/DetailedBolusInfoExtension.kt b/core/core-main/src/main/java/info/nightscout/core/pumpExtensions/DetailedBolusInfoExtension.kt new file mode 100644 index 0000000000..2bf38f8193 --- /dev/null +++ b/core/core-main/src/main/java/info/nightscout/core/pumpExtensions/DetailedBolusInfoExtension.kt @@ -0,0 +1,26 @@ +package info.nightscout.core.pumpExtensions + +import com.google.gson.Gson +import info.nightscout.database.impl.transactions.InsertOrUpdateBolusTransaction +import info.nightscout.database.impl.transactions.InsertOrUpdateCarbsTransaction +import info.nightscout.interfaces.pump.DetailedBolusInfo + +fun DetailedBolusInfo.insertCarbsTransaction(): InsertOrUpdateCarbsTransaction { + if (carbs == 0.0) throw IllegalStateException("carbs == 0.0") + return InsertOrUpdateCarbsTransaction(createCarbs()!!) +} + +fun DetailedBolusInfo.insertBolusTransaction(): InsertOrUpdateBolusTransaction { + if (insulin == 0.0) throw IllegalStateException("insulin == 0.0") + return InsertOrUpdateBolusTransaction(createBolus()!!) +} + +fun DetailedBolusInfo.toJsonString(): String = Gson().toJson(this) + +// Cannot access Companion extension from java so create common +fun DetailedBolusInfo.fromJsonString(json: String): DetailedBolusInfo = + Gson().fromJson(json, DetailedBolusInfo::class.java) + + + + diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/PumpStateExtension.kt b/core/core-main/src/main/java/info/nightscout/core/pumpExtensions/PumpStateExtension.kt similarity index 95% rename from core/core-main/src/main/java/info/nightscout/androidaps/extensions/PumpStateExtension.kt rename to core/core-main/src/main/java/info/nightscout/core/pumpExtensions/PumpStateExtension.kt index 755243fca2..b4d6bce4bc 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/PumpStateExtension.kt +++ b/core/core-main/src/main/java/info/nightscout/core/pumpExtensions/PumpStateExtension.kt @@ -2,9 +2,8 @@ package info.nightscout.androidaps.extensions import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.shared.utils.DateUtil import info.nightscout.androidaps.utils.DecimalFormatter -import info.nightscout.androidaps.utils.DecimalFormatter.to2Decimal +import info.nightscout.shared.utils.DateUtil import info.nightscout.shared.utils.T import kotlin.math.ceil import kotlin.math.max @@ -56,7 +55,7 @@ fun PumpSync.PumpState.ExtendedBolus.getPassedDurationToTimeInMinutes(time: Long ((min(time, end) - timestamp) / 60.0 / 1000).roundToInt() fun PumpSync.PumpState.ExtendedBolus.toStringFull(dateUtil: DateUtil): String = - "E " + to2Decimal(rate) + "U/h @" + + "E " + DecimalFormatter.to2Decimal(rate) + "U/h @" + dateUtil.timeString(timestamp) + " " + getPassedDurationToTimeInMinutes(dateUtil.now()) + "/" + T.msecs(duration).mins() + "min" diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/PumpTypeExtension.kt b/core/core-main/src/main/java/info/nightscout/core/pumpExtensions/PumpTypeExtension.kt similarity index 99% rename from core/core-main/src/main/java/info/nightscout/androidaps/extensions/PumpTypeExtension.kt rename to core/core-main/src/main/java/info/nightscout/core/pumpExtensions/PumpTypeExtension.kt index 0514020c57..f423372b92 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/PumpTypeExtension.kt +++ b/core/core-main/src/main/java/info/nightscout/core/pumpExtensions/PumpTypeExtension.kt @@ -2,7 +2,7 @@ package info.nightscout.androidaps.extensions import info.nightscout.database.entities.UserEntry import info.nightscout.database.entities.embedments.InterfaceIDs -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType fun PumpType.Companion.fromDbSource(s: UserEntry.Sources): PumpType.Source = when (s) { diff --git a/core/core-main/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt b/core/core-main/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt index 6d317c2037..257a6c9c02 100644 --- a/core/core-main/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt +++ b/core/core-main/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt @@ -1,15 +1,15 @@ package info.nightscout.androidaps import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.interfaces.data.PumpEnactResult import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.Pump -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.interfaces.pump.ManufacturerType -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.ManufacturerType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.utils.TimeChangeType import org.json.JSONObject diff --git a/core/core-main/src/test/java/info/nightscout/androidaps/data/DetailedBolusInfoTest.kt b/core/core-main/src/test/java/info/nightscout/androidaps/data/DetailedBolusInfoTest.kt index 8a47986297..1ad9c94645 100644 --- a/core/core-main/src/test/java/info/nightscout/androidaps/data/DetailedBolusInfoTest.kt +++ b/core/core-main/src/test/java/info/nightscout/androidaps/data/DetailedBolusInfoTest.kt @@ -2,9 +2,12 @@ package info.nightscout.androidaps.data import android.content.Context import info.nightscout.androidaps.TestBase +import info.nightscout.core.pumpExtensions.fromJsonString +import info.nightscout.core.pumpExtensions.toJsonString import info.nightscout.database.entities.Bolus import info.nightscout.database.entities.BolusCalculatorResult import info.nightscout.database.entities.TherapyEvent +import info.nightscout.interfaces.pump.DetailedBolusInfo import org.apache.commons.lang3.builder.EqualsBuilder import org.junit.Assert import org.junit.Test diff --git a/core/core-main/src/test/java/info/nightscout/androidaps/interfaces/PumpDescriptionTest.kt b/core/core-main/src/test/java/info/nightscout/androidaps/interfaces/PumpDescriptionTest.kt index f46f2e0daa..e845e45d73 100644 --- a/core/core-main/src/test/java/info/nightscout/androidaps/interfaces/PumpDescriptionTest.kt +++ b/core/core-main/src/test/java/info/nightscout/androidaps/interfaces/PumpDescriptionTest.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.interfaces -import info.nightscout.interfaces.pump.PumpCapability -import info.nightscout.interfaces.pump.PumpDescription -import info.nightscout.interfaces.pump.PumpTempBasalType -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpCapability +import info.nightscout.interfaces.pump.defs.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpTempBasalType +import info.nightscout.interfaces.pump.defs.PumpType import org.junit.Assert import org.junit.Test diff --git a/core/core-main/src/test/java/info/nightscout/androidaps/plugins/aps/loop/APSResultTest.kt b/core/core-main/src/test/java/info/nightscout/androidaps/plugins/aps/loop/APSResultTest.kt index 5e9f4108ec..a3b08207e6 100644 --- a/core/core-main/src/test/java/info/nightscout/androidaps/plugins/aps/loop/APSResultTest.kt +++ b/core/core-main/src/test/java/info/nightscout/androidaps/plugins/aps/loop/APSResultTest.kt @@ -7,7 +7,7 @@ import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.database.entities.TemporaryBasal import info.nightscout.interfaces.Constraint -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.utils.JsonHelper.safeGetDouble import org.junit.Assert import org.junit.Before diff --git a/core/core-main/src/test/java/info/nightscout/androidaps/pump/bolusInfo/DetailedBolusInfoStorageTest.kt b/core/core-main/src/test/java/info/nightscout/androidaps/pump/bolusInfo/DetailedBolusInfoStorageTest.kt index e6d0c7ac4e..1bec2f8fcc 100644 --- a/core/core-main/src/test/java/info/nightscout/androidaps/pump/bolusInfo/DetailedBolusInfoStorageTest.kt +++ b/core/core-main/src/test/java/info/nightscout/androidaps/pump/bolusInfo/DetailedBolusInfoStorageTest.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.pump.bolusInfo import info.nightscout.androidaps.TestBase -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage import org.junit.Assert.assertEquals import org.junit.Assert.assertNull diff --git a/implementation/src/main/java/info/nightscout/implementation/pump/PumpSyncImplementation.kt b/implementation/src/main/java/info/nightscout/implementation/pump/PumpSyncImplementation.kt index 8ab7ace961..462e3c3115 100644 --- a/implementation/src/main/java/info/nightscout/implementation/pump/PumpSyncImplementation.kt +++ b/implementation/src/main/java/info/nightscout/implementation/pump/PumpSyncImplementation.kt @@ -1,6 +1,6 @@ package info.nightscout.implementation.pump -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.ValueWrapper import info.nightscout.database.impl.transactions.InsertBolusWithTempIdTransaction @@ -39,7 +39,7 @@ import info.nightscout.database.entities.ValueWithUnit import info.nightscout.database.entities.embedments.InterfaceIDs import info.nightscout.interfaces.VirtualPump import info.nightscout.interfaces.notifications.Notification -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/CommandQueueImplementation.kt b/implementation/src/main/java/info/nightscout/implementation/queue/CommandQueueImplementation.kt index 014996b3ee..6c4186909f 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/CommandQueueImplementation.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/CommandQueueImplementation.kt @@ -7,12 +7,13 @@ import android.text.Spanned import androidx.appcompat.app.AppCompatActivity import dagger.android.HasAndroidInjector import info.nightscout.androidaps.annotations.OpenForTesting -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.ValueWrapper import info.nightscout.androidaps.dialogs.BolusProgressDialog +import info.nightscout.core.pumpExtensions.insertCarbsTransaction import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.Constraints diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandBolus.kt b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandBolus.kt index f2835e0849..b29702ebea 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandBolus.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandBolus.kt @@ -1,7 +1,7 @@ package info.nightscout.implementation.queue.commands import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.dialogs.BolusProgressDialog import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandSMBBolus.kt b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandSMBBolus.kt index fb53e43d46..1504be8a80 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandSMBBolus.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandSMBBolus.kt @@ -1,7 +1,7 @@ package info.nightscout.implementation.queue.commands import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.interfaces.data.PumpEnactResult import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.androidaps.interfaces.ActivePlugin diff --git a/implementation/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt b/implementation/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt index 6d317c2037..257a6c9c02 100644 --- a/implementation/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt +++ b/implementation/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt @@ -1,15 +1,15 @@ package info.nightscout.androidaps import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.interfaces.data.PumpEnactResult import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.Pump -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.interfaces.pump.ManufacturerType -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.ManufacturerType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.utils.TimeChangeType import org.json.JSONObject diff --git a/implementation/src/test/java/info/nightscout/implementation/queue/CommandQueueImplementationTest.kt b/implementation/src/test/java/info/nightscout/implementation/queue/CommandQueueImplementationTest.kt index 6767efaba0..33ea916bbf 100644 --- a/implementation/src/test/java/info/nightscout/implementation/queue/CommandQueueImplementationTest.kt +++ b/implementation/src/test/java/info/nightscout/implementation/queue/CommandQueueImplementationTest.kt @@ -6,7 +6,7 @@ import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import info.nightscout.androidaps.TestBaseWithProfile import info.nightscout.androidaps.TestPumpPlugin -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.ValueWrapper diff --git a/implementation/src/test/java/info/nightscout/implementation/queue/QueueThreadTest.kt b/implementation/src/test/java/info/nightscout/implementation/queue/QueueThreadTest.kt index 415f774342..30ce88d798 100644 --- a/implementation/src/test/java/info/nightscout/implementation/queue/QueueThreadTest.kt +++ b/implementation/src/test/java/info/nightscout/implementation/queue/QueueThreadTest.kt @@ -12,7 +12,7 @@ import info.nightscout.interfaces.ActivityNames import info.nightscout.interfaces.AndroidPermission import info.nightscout.interfaces.BuildHelper import info.nightscout.interfaces.Constraint -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.queue.commands.Command diff --git a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java index 01d07e6819..f4e20c86ac 100644 --- a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java +++ b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java @@ -30,7 +30,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import dagger.android.HasAndroidInjector; -import info.nightscout.androidaps.data.DetailedBolusInfo; +import info.nightscout.interfaces.pump.DetailedBolusInfo; import info.nightscout.interfaces.data.PumpEnactResult; import info.nightscout.androidaps.data.PumpEnactResultImpl; import info.nightscout.androidaps.insight.R; @@ -47,17 +47,17 @@ import info.nightscout.interfaces.PluginDescription; import info.nightscout.androidaps.interfaces.Profile; import info.nightscout.androidaps.interfaces.ProfileFunction; import info.nightscout.androidaps.interfaces.Pump; -import info.nightscout.interfaces.pump.PumpDescription; +import info.nightscout.interfaces.pump.defs.PumpDescription; import info.nightscout.androidaps.interfaces.PumpPluginBase; import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.androidaps.interfaces.PumpSync.PumpState.TemporaryBasal; import info.nightscout.shared.interfaces.ResourceHelper; -import info.nightscout.interfaces.pump.ManufacturerType; +import info.nightscout.interfaces.pump.defs.ManufacturerType; import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.rx.events.EventOverviewBolusProgress; import info.nightscout.interfaces.notifications.Notification; -import info.nightscout.interfaces.pump.PumpType; +import info.nightscout.interfaces.pump.defs.PumpType; import info.nightscout.androidaps.plugins.pump.insight.app_layer.Service; import info.nightscout.androidaps.plugins.pump.insight.app_layer.history.HistoryReadingDirection; import info.nightscout.androidaps.plugins.pump.insight.app_layer.history.ReadHistoryEventsMessage; diff --git a/interfaces/build.gradle b/interfaces/build.gradle index 3e5bcf62be..99cb129e22 100644 --- a/interfaces/build.gradle +++ b/interfaces/build.gradle @@ -23,6 +23,7 @@ dependencies { // (ResourceHelper, AAPSLogger interface) implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:rx') + implementation project(':database:entities') api "androidx.appcompat:appcompat:$appcompat_version" api "androidx.preference:preference-ktx:$preferencektx_version" diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/data/DetailedBolusInfo.kt b/interfaces/src/main/java/info/nightscout/interfaces/pump/DetailedBolusInfo.kt similarity index 82% rename from core/core-main/src/main/java/info/nightscout/androidaps/data/DetailedBolusInfo.kt rename to interfaces/src/main/java/info/nightscout/interfaces/pump/DetailedBolusInfo.kt index 74c62f0fb3..7e3f67e63b 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/data/DetailedBolusInfo.kt +++ b/interfaces/src/main/java/info/nightscout/interfaces/pump/DetailedBolusInfo.kt @@ -1,14 +1,11 @@ -package info.nightscout.androidaps.data +package info.nightscout.interfaces.pump import android.content.Context -import com.google.gson.Gson -import info.nightscout.database.impl.transactions.InsertOrUpdateBolusTransaction -import info.nightscout.database.impl.transactions.InsertOrUpdateCarbsTransaction import info.nightscout.database.entities.Bolus import info.nightscout.database.entities.BolusCalculatorResult import info.nightscout.database.entities.Carbs import info.nightscout.database.entities.TherapyEvent -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType class DetailedBolusInfo { @@ -120,19 +117,6 @@ class DetailedBolusInfo { ) else null - fun insertCarbsTransaction(): InsertOrUpdateCarbsTransaction { - if (carbs == 0.0) throw IllegalStateException("carbs == 0.0") - return InsertOrUpdateCarbsTransaction(createCarbs()!!) - } - - fun insertBolusTransaction(): InsertOrUpdateBolusTransaction { - if (insulin == 0.0) throw IllegalStateException("insulin == 0.0") - return InsertOrUpdateBolusTransaction(createBolus()!!) - } - - fun toJsonString(): String = - Gson().toJson(this) - fun copy(): DetailedBolusInfo { val n = DetailedBolusInfo() n.insulin = insulin @@ -159,11 +143,6 @@ class DetailedBolusInfo { return n } - override fun toString(): String = toJsonString() - companion object { - - fun fromJsonString(json: String): DetailedBolusInfo = - Gson().fromJson(json, DetailedBolusInfo::class.java) } } \ No newline at end of file diff --git a/interfaces/src/main/java/info/nightscout/interfaces/pump/DoseSettings.kt b/interfaces/src/main/java/info/nightscout/interfaces/pump/defs/DoseSettings.kt similarity index 77% rename from interfaces/src/main/java/info/nightscout/interfaces/pump/DoseSettings.kt rename to interfaces/src/main/java/info/nightscout/interfaces/pump/defs/DoseSettings.kt index 5a6193a7fd..2447c3d99f 100644 --- a/interfaces/src/main/java/info/nightscout/interfaces/pump/DoseSettings.kt +++ b/interfaces/src/main/java/info/nightscout/interfaces/pump/defs/DoseSettings.kt @@ -1,3 +1,3 @@ -package info.nightscout.interfaces.pump +package info.nightscout.interfaces.pump.defs class DoseSettings constructor(val step: Double, val durationStep: Int, val maxDuration: Int, val minDose: Double, val maxDose: Double = Double.MAX_VALUE) \ No newline at end of file diff --git a/interfaces/src/main/java/info/nightscout/interfaces/pump/DoseStepSize.kt b/interfaces/src/main/java/info/nightscout/interfaces/pump/defs/DoseStepSize.kt similarity index 84% rename from interfaces/src/main/java/info/nightscout/interfaces/pump/DoseStepSize.kt rename to interfaces/src/main/java/info/nightscout/interfaces/pump/defs/DoseStepSize.kt index d414146cca..ba48c0b716 100644 --- a/interfaces/src/main/java/info/nightscout/interfaces/pump/DoseStepSize.kt +++ b/interfaces/src/main/java/info/nightscout/interfaces/pump/defs/DoseStepSize.kt @@ -1,4 +1,4 @@ -package info.nightscout.interfaces.pump +package info.nightscout.interfaces.pump.defs import java.util.Locale @@ -7,24 +7,29 @@ enum class DoseStepSize(private val entries: Array) { ComboBasal(arrayOf( DoseStepSizeEntry(0.0, 1.0, 0.01), DoseStepSizeEntry(1.0, 10.0, 0.05), - DoseStepSizeEntry(10.0, Double.MAX_VALUE, 0.1))), + DoseStepSizeEntry(10.0, Double.MAX_VALUE, 0.1) + )), InsightBolus(arrayOf( DoseStepSizeEntry(0.0, 2.0, 0.05), DoseStepSizeEntry(2.0, 5.0, 0.1), DoseStepSizeEntry(5.0, 10.0, 0.2), - DoseStepSizeEntry(10.0, Double.MAX_VALUE, 0.5))), + DoseStepSizeEntry(10.0, Double.MAX_VALUE, 0.5) + )), InsightBasal(arrayOf( DoseStepSizeEntry(0.0, 5.0, 0.01), - DoseStepSizeEntry(5.0, Double.MAX_VALUE, 0.1))), + DoseStepSizeEntry(5.0, Double.MAX_VALUE, 0.1) + )), MedtronicVeoBasal(arrayOf( DoseStepSizeEntry(0.0, 1.0, 0.025), DoseStepSizeEntry(1.0, 10.0, 0.05), - DoseStepSizeEntry(10.0, Double.MAX_VALUE, 0.1))), + DoseStepSizeEntry(10.0, Double.MAX_VALUE, 0.1) + )), YpsopumpBasal(arrayOf( DoseStepSizeEntry(0.0, 1.0, 0.01), DoseStepSizeEntry(1.0, 2.0, 0.02), DoseStepSizeEntry(2.0, 15.0, 0.1), - DoseStepSizeEntry(15.0, 40.0, 0.5)) + DoseStepSizeEntry(15.0, 40.0, 0.5) + ) ); fun getStepSizeForAmount(amount: Double): Double { diff --git a/interfaces/src/main/java/info/nightscout/interfaces/pump/ManufacturerType.kt b/interfaces/src/main/java/info/nightscout/interfaces/pump/defs/ManufacturerType.kt similarity index 86% rename from interfaces/src/main/java/info/nightscout/interfaces/pump/ManufacturerType.kt rename to interfaces/src/main/java/info/nightscout/interfaces/pump/defs/ManufacturerType.kt index fd197fee3d..ddecad988c 100644 --- a/interfaces/src/main/java/info/nightscout/interfaces/pump/ManufacturerType.kt +++ b/interfaces/src/main/java/info/nightscout/interfaces/pump/defs/ManufacturerType.kt @@ -1,4 +1,4 @@ -package info.nightscout.interfaces.pump +package info.nightscout.interfaces.pump.defs enum class ManufacturerType(val description: String) { AAPS("AAPS"), diff --git a/interfaces/src/main/java/info/nightscout/interfaces/pump/PumpCapability.kt b/interfaces/src/main/java/info/nightscout/interfaces/pump/defs/PumpCapability.kt similarity index 98% rename from interfaces/src/main/java/info/nightscout/interfaces/pump/PumpCapability.kt rename to interfaces/src/main/java/info/nightscout/interfaces/pump/defs/PumpCapability.kt index e8b58042c9..ed9620a818 100644 --- a/interfaces/src/main/java/info/nightscout/interfaces/pump/PumpCapability.kt +++ b/interfaces/src/main/java/info/nightscout/interfaces/pump/defs/PumpCapability.kt @@ -1,4 +1,4 @@ -package info.nightscout.interfaces.pump +package info.nightscout.interfaces.pump.defs enum class PumpCapability { diff --git a/interfaces/src/main/java/info/nightscout/interfaces/pump/PumpDescription.kt b/interfaces/src/main/java/info/nightscout/interfaces/pump/defs/PumpDescription.kt similarity index 99% rename from interfaces/src/main/java/info/nightscout/interfaces/pump/PumpDescription.kt rename to interfaces/src/main/java/info/nightscout/interfaces/pump/defs/PumpDescription.kt index 093cfa6756..f3a8e68ce7 100644 --- a/interfaces/src/main/java/info/nightscout/interfaces/pump/PumpDescription.kt +++ b/interfaces/src/main/java/info/nightscout/interfaces/pump/defs/PumpDescription.kt @@ -1,4 +1,4 @@ -package info.nightscout.interfaces.pump +package info.nightscout.interfaces.pump.defs class PumpDescription() { diff --git a/interfaces/src/main/java/info/nightscout/interfaces/pump/PumpTempBasalType.kt b/interfaces/src/main/java/info/nightscout/interfaces/pump/defs/PumpTempBasalType.kt similarity index 57% rename from interfaces/src/main/java/info/nightscout/interfaces/pump/PumpTempBasalType.kt rename to interfaces/src/main/java/info/nightscout/interfaces/pump/defs/PumpTempBasalType.kt index 101b685432..49eacfda89 100644 --- a/interfaces/src/main/java/info/nightscout/interfaces/pump/PumpTempBasalType.kt +++ b/interfaces/src/main/java/info/nightscout/interfaces/pump/defs/PumpTempBasalType.kt @@ -1,4 +1,4 @@ -package info.nightscout.interfaces.pump +package info.nightscout.interfaces.pump.defs enum class PumpTempBasalType { diff --git a/interfaces/src/main/java/info/nightscout/interfaces/pump/PumpType.kt b/interfaces/src/main/java/info/nightscout/interfaces/pump/defs/PumpType.kt similarity index 99% rename from interfaces/src/main/java/info/nightscout/interfaces/pump/PumpType.kt rename to interfaces/src/main/java/info/nightscout/interfaces/pump/defs/PumpType.kt index 047bbbdcd0..30163c9ddf 100644 --- a/interfaces/src/main/java/info/nightscout/interfaces/pump/PumpType.kt +++ b/interfaces/src/main/java/info/nightscout/interfaces/pump/defs/PumpType.kt @@ -1,4 +1,4 @@ -package info.nightscout.interfaces.pump +package info.nightscout.interfaces.pump.defs import info.nightscout.interfaces.R import info.nightscout.interfaces.utils.Round diff --git a/interfaces/src/main/java/info/nightscout/interfaces/storage/FileStrorage.kt b/interfaces/src/main/java/info/nightscout/interfaces/storage/FileStorage.kt similarity index 100% rename from interfaces/src/main/java/info/nightscout/interfaces/storage/FileStrorage.kt rename to interfaces/src/main/java/info/nightscout/interfaces/storage/FileStorage.kt diff --git a/plugins/src/main/java/info/nightscout/plugins/configBuilder/RunningConfiguration.kt b/plugins/src/main/java/info/nightscout/plugins/configBuilder/RunningConfiguration.kt index 54652d33fd..f6e997f5bb 100644 --- a/plugins/src/main/java/info/nightscout/plugins/configBuilder/RunningConfiguration.kt +++ b/plugins/src/main/java/info/nightscout/plugins/configBuilder/RunningConfiguration.kt @@ -8,7 +8,7 @@ import info.nightscout.interfaces.NsClient import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.Sensitivity import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.Config import info.nightscout.interfaces.PluginType import info.nightscout.interfaces.notifications.Notification diff --git a/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorPlugin.kt index 3ae44eb019..b1a9c2f03f 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorPlugin.kt @@ -12,7 +12,7 @@ import androidx.work.WorkerParameters import androidx.work.workDataOf import dagger.android.HasAndroidInjector import info.nightscout.androidaps.annotations.OpenForTesting -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.transactions.CancelCurrentOfflineEventIfAnyTransaction import info.nightscout.database.impl.transactions.CancelCurrentTemporaryTargetIfAnyTransaction diff --git a/plugins/src/main/java/info/nightscout/plugins/pump/virtual/VirtualPumpPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/pump/virtual/VirtualPumpPlugin.kt index 9ab739ee3f..f4c9728d2c 100644 --- a/plugins/src/main/java/info/nightscout/plugins/pump/virtual/VirtualPumpPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/pump/virtual/VirtualPumpPlugin.kt @@ -4,7 +4,7 @@ import android.os.SystemClock import androidx.preference.PreferenceFragmentCompat import androidx.preference.SwitchPreference import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.androidaps.dialogs.BolusProgressDialog import info.nightscout.androidaps.events.EventPreferenceChange @@ -25,9 +25,9 @@ import info.nightscout.interfaces.PluginType import info.nightscout.interfaces.VirtualPump import info.nightscout.interfaces.data.PumpEnactResult import info.nightscout.interfaces.notifications.Notification -import info.nightscout.interfaces.pump.ManufacturerType -import info.nightscout.interfaces.pump.PumpDescription -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.ManufacturerType +import info.nightscout.interfaces.pump.defs.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.utils.TimeChangeType import info.nightscout.plugins.R import info.nightscout.plugins.pump.virtual.events.EventVirtualPumpUpdateGui diff --git a/plugins/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt b/plugins/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt index 6d317c2037..257a6c9c02 100644 --- a/plugins/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt +++ b/plugins/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt @@ -1,15 +1,15 @@ package info.nightscout.androidaps import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.interfaces.data.PumpEnactResult import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.Pump -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.interfaces.pump.ManufacturerType -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.ManufacturerType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.utils.TimeChangeType import org.json.JSONObject diff --git a/plugins/src/test/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorPluginTest.kt b/plugins/src/test/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorPluginTest.kt index cf18f7b6e9..eedd871589 100644 --- a/plugins/src/test/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorPluginTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorPluginTest.kt @@ -28,8 +28,8 @@ import info.nightscout.interfaces.Constraint import info.nightscout.interfaces.GlucoseUnit import info.nightscout.interfaces.PluginType import info.nightscout.interfaces.data.smsCommunicator.Sms -import info.nightscout.interfaces.pump.PumpDescription -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.queue.Callback import info.nightscout.plugins.R import info.nightscout.plugins.general.smsCommunicator.otp.OneTimePassword diff --git a/plugins/src/test/java/info/nightscout/plugins/pump/virtual/VirtualPumpPluginUTest.kt b/plugins/src/test/java/info/nightscout/plugins/pump/virtual/VirtualPumpPluginUTest.kt index 4905016c15..d2a3b94414 100644 --- a/plugins/src/test/java/info/nightscout/plugins/pump/virtual/VirtualPumpPluginUTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/pump/virtual/VirtualPumpPluginUTest.kt @@ -8,7 +8,7 @@ import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.interfaces.Config -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.shared.interfaces.ResourceHelper diff --git a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ComboPlugin.java b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ComboPlugin.java index 5c2a8f8831..e1c785ef2e 100644 --- a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ComboPlugin.java +++ b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ComboPlugin.java @@ -21,7 +21,7 @@ import javax.inject.Singleton; import dagger.android.HasAndroidInjector; import info.nightscout.androidaps.combo.R; -import info.nightscout.androidaps.data.DetailedBolusInfo; +import info.nightscout.interfaces.pump.DetailedBolusInfo; import info.nightscout.androidaps.data.PumpEnactResultImpl; import info.nightscout.androidaps.extensions.PumpStateExtensionKt; import info.nightscout.androidaps.interfaces.CommandQueue; @@ -52,9 +52,9 @@ import info.nightscout.interfaces.PluginDescription; import info.nightscout.interfaces.PluginType; import info.nightscout.interfaces.data.PumpEnactResult; import info.nightscout.interfaces.notifications.Notification; -import info.nightscout.interfaces.pump.ManufacturerType; -import info.nightscout.interfaces.pump.PumpDescription; -import info.nightscout.interfaces.pump.PumpType; +import info.nightscout.interfaces.pump.defs.ManufacturerType; +import info.nightscout.interfaces.pump.defs.PumpDescription; +import info.nightscout.interfaces.pump.defs.PumpType; import info.nightscout.rx.bus.RxBus; import info.nightscout.rx.events.EventInitializationChanged; import info.nightscout.rx.events.EventOverviewBolusProgress; diff --git a/pump/dana/src/main/java/info/nightscout/androidaps/dana/DanaFragment.kt b/pump/dana/src/main/java/info/nightscout/androidaps/dana/DanaFragment.kt index e284fa66c8..9d548b19f0 100644 --- a/pump/dana/src/main/java/info/nightscout/androidaps/dana/DanaFragment.kt +++ b/pump/dana/src/main/java/info/nightscout/androidaps/dana/DanaFragment.kt @@ -27,7 +27,7 @@ import info.nightscout.androidaps.utils.userEntry.UserEntryMapper.Sources import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.interfaces.ActivityNames import info.nightscout.interfaces.Dana -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.bus.RxBus import info.nightscout.rx.events.EventExtendedBolusChange diff --git a/pump/dana/src/main/java/info/nightscout/androidaps/dana/DanaPump.kt b/pump/dana/src/main/java/info/nightscout/androidaps/dana/DanaPump.kt index a8ab56ba04..9e359cca39 100644 --- a/pump/dana/src/main/java/info/nightscout/androidaps/dana/DanaPump.kt +++ b/pump/dana/src/main/java/info/nightscout/androidaps/dana/DanaPump.kt @@ -6,7 +6,7 @@ import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileStore import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.rx.events.EventOverviewBolusProgress -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.shared.utils.DateUtil import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.shared.utils.T diff --git a/pump/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaHistoryActivity.kt b/pump/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaHistoryActivity.kt index 758db789a5..c4d9a8dc29 100644 --- a/pump/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaHistoryActivity.kt +++ b/pump/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaHistoryActivity.kt @@ -23,7 +23,7 @@ import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.interfaces.Constants -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.queue.Callback import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.events.EventDanaRSyncStatus diff --git a/pump/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaUserOptionsActivity.kt b/pump/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaUserOptionsActivity.kt index d59ebb424f..31eacc0867 100644 --- a/pump/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaUserOptionsActivity.kt +++ b/pump/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaUserOptionsActivity.kt @@ -11,7 +11,7 @@ import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.interfaces.ActivityNames import info.nightscout.interfaces.Constants -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.queue.Callback import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.events.EventInitializationChanged diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/DanaRKoreanPlugin.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/DanaRKoreanPlugin.kt index d4f99224f8..16659fb8e6 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/DanaRKoreanPlugin.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/DanaRKoreanPlugin.kt @@ -10,7 +10,7 @@ import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danaRKorean.services.DanaRKoreanExecutionService import info.nightscout.androidaps.danar.AbstractDanaRPlugin import info.nightscout.androidaps.danar.R -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.androidaps.events.EventPreferenceChange import info.nightscout.androidaps.interfaces.ActivePlugin @@ -22,7 +22,7 @@ import info.nightscout.androidaps.interfaces.PumpSync.TemporaryBasalType import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.interfaces.Constraint import info.nightscout.interfaces.data.PumpEnactResult -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.utils.Round import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.bus.RxBus diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/services/DanaRKoreanExecutionService.java b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/services/DanaRKoreanExecutionService.java index b976c5516e..41658f5a24 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/services/DanaRKoreanExecutionService.java +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/services/DanaRKoreanExecutionService.java @@ -50,7 +50,7 @@ import info.nightscout.shared.interfaces.ResourceHelper; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.rx.events.EventOverviewBolusProgress; import info.nightscout.interfaces.notifications.Notification; -import info.nightscout.interfaces.pump.PumpType; +import info.nightscout.interfaces.pump.defs.PumpType; import info.nightscout.androidaps.queue.commands.Command; import info.nightscout.shared.utils.DateUtil; import info.nightscout.shared.utils.T; diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java index ae88a17e18..3b370f91cf 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java @@ -16,7 +16,7 @@ import info.nightscout.androidaps.dana.DanaPump; import info.nightscout.androidaps.danaRv2.services.DanaRv2ExecutionService; import info.nightscout.androidaps.danar.AbstractDanaRPlugin; import info.nightscout.androidaps.danar.R; -import info.nightscout.androidaps.data.DetailedBolusInfo; +import info.nightscout.interfaces.pump.DetailedBolusInfo; import info.nightscout.androidaps.data.PumpEnactResultImpl; import info.nightscout.androidaps.interfaces.ActivePlugin; import info.nightscout.androidaps.interfaces.CommandQueue; @@ -28,7 +28,7 @@ import info.nightscout.androidaps.plugins.pump.common.bolusInfo.TemporaryBasalSt import info.nightscout.core.fabric.FabricPrivacy; import info.nightscout.interfaces.Constraint; import info.nightscout.interfaces.data.PumpEnactResult; -import info.nightscout.interfaces.pump.PumpType; +import info.nightscout.interfaces.pump.defs.PumpType; import info.nightscout.interfaces.utils.Round; import info.nightscout.rx.AapsSchedulers; import info.nightscout.rx.bus.RxBus; diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgHistoryEventsV2.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgHistoryEventsV2.kt index 692d81d004..dcc08e521e 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgHistoryEventsV2.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgHistoryEventsV2.kt @@ -5,7 +5,7 @@ import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danar.R import info.nightscout.androidaps.danar.comm.MessageBase import info.nightscout.androidaps.events.EventPumpStatusChanged -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.shared.utils.T import info.nightscout.rx.logging.LTag import java.util.GregorianCalendar diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/services/DanaRv2ExecutionService.java b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/services/DanaRv2ExecutionService.java index 8f16467156..d1bfa31449 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/services/DanaRv2ExecutionService.java +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/services/DanaRv2ExecutionService.java @@ -64,7 +64,7 @@ import info.nightscout.shared.interfaces.ResourceHelper; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.rx.events.EventOverviewBolusProgress; import info.nightscout.interfaces.notifications.Notification; -import info.nightscout.interfaces.pump.PumpType; +import info.nightscout.interfaces.pump.defs.PumpType; import info.nightscout.interfaces.queue.Callback; import info.nightscout.androidaps.queue.commands.Command; import info.nightscout.shared.utils.DateUtil; diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/AbstractDanaRPlugin.java b/pump/danar/src/main/java/info/nightscout/androidaps/danar/AbstractDanaRPlugin.java index 50037a8eb5..bb17c5aa31 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/AbstractDanaRPlugin.java +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/AbstractDanaRPlugin.java @@ -22,11 +22,11 @@ import info.nightscout.interfaces.Dana; import info.nightscout.interfaces.PluginDescription; import info.nightscout.androidaps.interfaces.Profile; import info.nightscout.androidaps.interfaces.Pump; -import info.nightscout.interfaces.pump.PumpDescription; +import info.nightscout.interfaces.pump.defs.PumpDescription; import info.nightscout.androidaps.interfaces.PumpPluginBase; import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.shared.interfaces.ResourceHelper; -import info.nightscout.interfaces.pump.ManufacturerType; +import info.nightscout.interfaces.pump.defs.ManufacturerType; import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.interfaces.notifications.Notification; diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/DanaRPlugin.java b/pump/danar/src/main/java/info/nightscout/androidaps/danar/DanaRPlugin.java index 9e1eae94a9..f4170805d9 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/DanaRPlugin.java +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/DanaRPlugin.java @@ -14,7 +14,7 @@ import javax.inject.Singleton; import dagger.android.HasAndroidInjector; import info.nightscout.androidaps.dana.DanaPump; import info.nightscout.androidaps.danar.services.DanaRExecutionService; -import info.nightscout.androidaps.data.DetailedBolusInfo; +import info.nightscout.interfaces.pump.DetailedBolusInfo; import info.nightscout.androidaps.data.PumpEnactResultImpl; import info.nightscout.androidaps.events.EventPreferenceChange; import info.nightscout.androidaps.interfaces.ActivePlugin; @@ -25,7 +25,7 @@ import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.core.fabric.FabricPrivacy; import info.nightscout.interfaces.Constraint; import info.nightscout.interfaces.data.PumpEnactResult; -import info.nightscout.interfaces.pump.PumpType; +import info.nightscout.interfaces.pump.defs.PumpType; import info.nightscout.interfaces.utils.Round; import info.nightscout.rx.AapsSchedulers; import info.nightscout.rx.bus.RxBus; diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/services/DanaRExecutionService.java b/pump/danar/src/main/java/info/nightscout/androidaps/danar/services/DanaRExecutionService.java index da21a175c8..9ca9e5720d 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/services/DanaRExecutionService.java +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/services/DanaRExecutionService.java @@ -56,7 +56,7 @@ import info.nightscout.shared.interfaces.ResourceHelper; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.rx.events.EventOverviewBolusProgress; import info.nightscout.interfaces.notifications.Notification; -import info.nightscout.interfaces.pump.PumpType; +import info.nightscout.interfaces.pump.defs.PumpType; import info.nightscout.interfaces.queue.Callback; import info.nightscout.androidaps.queue.commands.Command; import info.nightscout.rx.bus.RxBus; diff --git a/pump/danar/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt b/pump/danar/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt index 32d027eaff..df7e553b7b 100644 --- a/pump/danar/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt +++ b/pump/danar/src/test/java/info/nightscout/androidaps/TestPumpPlugin.kt @@ -1,15 +1,15 @@ package info.nightscout.androidaps import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.interfaces.data.PumpEnactResult import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.Pump -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.interfaces.pump.ManufacturerType -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.ManufacturerType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.utils.TimeChangeType import org.json.JSONObject diff --git a/pump/danar/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasalTest.kt b/pump/danar/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasalTest.kt index 00cbdcd754..226da3f35d 100644 --- a/pump/danar/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasalTest.kt +++ b/pump/danar/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasalTest.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm import info.nightscout.androidaps.danar.comm.MsgSettingBasal -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import org.junit.Assert import org.junit.Test import org.mockito.Mockito.`when` diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/DanaRSPlugin.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/DanaRSPlugin.kt index 6d5ffdd808..d228207688 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/DanaRSPlugin.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/DanaRSPlugin.kt @@ -13,7 +13,7 @@ import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.dana.comm.RecordTypes import info.nightscout.androidaps.danars.events.EventDanaRSDeviceChange import info.nightscout.androidaps.danars.services.DanaRSService -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.androidaps.extensions.convertedToAbsolute import info.nightscout.androidaps.extensions.plannedRemainingMinutes @@ -37,9 +37,9 @@ import info.nightscout.interfaces.PluginDescription import info.nightscout.interfaces.PluginType import info.nightscout.interfaces.data.PumpEnactResult import info.nightscout.interfaces.notifications.Notification -import info.nightscout.interfaces.pump.ManufacturerType -import info.nightscout.interfaces.pump.PumpDescription -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.ManufacturerType +import info.nightscout.interfaces.pump.defs.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.utils.Round import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.bus.RxBus diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketAPSHistoryEvents.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketAPSHistoryEvents.kt index 64a4cad34f..f844000096 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketAPSHistoryEvents.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketAPSHistoryEvents.kt @@ -4,7 +4,7 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.R import info.nightscout.androidaps.danars.encryption.BleEncryption -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.events.EventPumpStatusChanged import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.shared.interfaces.ResourceHelper diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Plugin.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Plugin.kt index 6857f3036e..8c99c3021d 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Plugin.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Plugin.kt @@ -9,7 +9,7 @@ import android.text.format.DateFormat import androidx.preference.Preference import androidx.preference.PreferenceFragmentCompat import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.androidaps.diaconn.events.EventDiaconnG8DeviceChange import info.nightscout.androidaps.diaconn.service.DiaconnG8Service @@ -35,9 +35,9 @@ import info.nightscout.interfaces.PluginDescription import info.nightscout.interfaces.PluginType import info.nightscout.interfaces.data.PumpEnactResult import info.nightscout.interfaces.notifications.Notification -import info.nightscout.interfaces.pump.ManufacturerType -import info.nightscout.interfaces.pump.PumpDescription -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.ManufacturerType +import info.nightscout.interfaces.pump.defs.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.pump.actions.CustomAction import info.nightscout.interfaces.pump.actions.CustomActionType import info.nightscout.interfaces.utils.Round diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigLogInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigLogInquireResponsePacket.kt index 1e3dbcdc15..b3ccc3a82a 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigLogInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigLogInquireResponsePacket.kt @@ -2,7 +2,7 @@ package info.nightscout.androidaps.diaconn.packet import android.content.Context import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.diaconn.DiaconnG8Pump import info.nightscout.androidaps.diaconn.R import info.nightscout.androidaps.diaconn.api.ApiResponse @@ -42,12 +42,12 @@ import info.nightscout.androidaps.diaconn.pumplog.PumplogUtil import info.nightscout.androidaps.events.EventPumpStatusChanged import info.nightscout.shared.extensions.safeGetPackageInfo import info.nightscout.androidaps.interfaces.ActivePlugin -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage import info.nightscout.androidaps.plugins.pump.common.bolusInfo.TemporaryBasalStorage -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.shared.utils.T import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.LTag diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigMainInfoInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigMainInfoInquireResponsePacket.kt index 0a13886f76..cf2b93eb6a 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigMainInfoInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigMainInfoInquireResponsePacket.kt @@ -4,9 +4,9 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump import info.nightscout.androidaps.diaconn.R import info.nightscout.androidaps.diaconn.pumplog.PumplogUtil -import info.nightscout.interfaces.pump.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpDescription import info.nightscout.shared.interfaces.ResourceHelper -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.joda.time.DateTime diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/DiaconnG8Service.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/DiaconnG8Service.kt index 3d2c3405ef..279e1ab710 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/DiaconnG8Service.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/DiaconnG8Service.kt @@ -61,7 +61,7 @@ import info.nightscout.interfaces.ActivityNames import info.nightscout.interfaces.Constants import info.nightscout.interfaces.data.PumpEnactResult import info.nightscout.interfaces.notifications.Notification -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.queue.Callback import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.bus.RxBus diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EopatchPumpPlugin.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EopatchPumpPlugin.kt index 9970889317..77a03b7cec 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EopatchPumpPlugin.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EopatchPumpPlugin.kt @@ -2,7 +2,7 @@ package info.nightscout.androidaps.plugins.pump.eopatch import android.os.SystemClock import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.androidaps.events.EventPreferenceChange import info.nightscout.androidaps.interfaces.CommandQueue @@ -23,9 +23,9 @@ import info.nightscout.interfaces.PluginDescription import info.nightscout.interfaces.PluginType import info.nightscout.interfaces.data.PumpEnactResult import info.nightscout.interfaces.notifications.Notification -import info.nightscout.interfaces.pump.ManufacturerType -import info.nightscout.interfaces.pump.PumpDescription -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.ManufacturerType +import info.nightscout.interfaces.pump.defs.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.pump.actions.CustomAction import info.nightscout.interfaces.pump.actions.CustomActionType import info.nightscout.interfaces.queue.CustomCommand diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/alarm/AlarmManager.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/alarm/AlarmManager.kt index 219cb88236..ae422e51c9 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/alarm/AlarmManager.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/alarm/AlarmManager.kt @@ -23,7 +23,7 @@ import info.nightscout.androidaps.plugins.pump.eopatch.ui.AlarmHelperActivity import info.nightscout.androidaps.plugins.pump.eopatch.vo.Alarms import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.interfaces.notifications.Notification -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/IPatchManager.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/IPatchManager.java index 1cd9b5eef2..9d5c5c8dbb 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/IPatchManager.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/IPatchManager.java @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble; -import info.nightscout.androidaps.data.DetailedBolusInfo; +import info.nightscout.interfaces.pump.DetailedBolusInfo; import info.nightscout.androidaps.plugins.pump.eopatch.core.scan.BleConnectionState; import info.nightscout.androidaps.plugins.pump.eopatch.core.scan.PatchSelfTestResult; import info.nightscout.androidaps.plugins.pump.eopatch.core.scan.ScanList; diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManager.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManager.java index c381fa1224..c9b870d70a 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManager.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManager.java @@ -8,14 +8,14 @@ import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.inject.Singleton; -import info.nightscout.androidaps.data.DetailedBolusInfo; +import info.nightscout.interfaces.pump.DetailedBolusInfo; import info.nightscout.androidaps.events.EventPumpStatusChanged; import info.nightscout.androidaps.interfaces.ActivePlugin; import info.nightscout.androidaps.interfaces.CommandQueue; import info.nightscout.androidaps.interfaces.ProfileFunction; import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.shared.interfaces.ResourceHelper; -import info.nightscout.interfaces.pump.PumpType; +import info.nightscout.interfaces.pump.defs.PumpType; import info.nightscout.androidaps.plugins.pump.eopatch.R; import info.nightscout.androidaps.plugins.pump.eopatch.RxAction; import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode; diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManagerImpl.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManagerImpl.java index 3c3b93b119..2a50545bbb 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManagerImpl.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManagerImpl.java @@ -33,9 +33,9 @@ import javax.crypto.KeyAgreement; import javax.inject.Inject; import javax.inject.Singleton; -import info.nightscout.androidaps.data.DetailedBolusInfo; +import info.nightscout.interfaces.pump.DetailedBolusInfo; import info.nightscout.androidaps.interfaces.PumpSync; -import info.nightscout.interfaces.pump.PumpType; +import info.nightscout.interfaces.pump.defs.PumpType; import info.nightscout.androidaps.plugins.pump.eopatch.EoPatchRxBus; import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode; import info.nightscout.androidaps.plugins.pump.eopatch.ble.task.ActivateTask; diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartCalcBolusTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartCalcBolusTask.java index d27729eea5..a6a5b58a14 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartCalcBolusTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartCalcBolusTask.java @@ -3,7 +3,7 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; import javax.inject.Inject; import javax.inject.Singleton; -import info.nightscout.androidaps.data.DetailedBolusInfo; +import info.nightscout.interfaces.pump.DetailedBolusInfo; import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BolusStart; import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BolusResponse; import info.nightscout.rx.logging.LTag; diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/viewmodel/EopatchOverviewViewModel.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/viewmodel/EopatchOverviewViewModel.kt index 166b261687..26e8d27b61 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/viewmodel/EopatchOverviewViewModel.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/viewmodel/EopatchOverviewViewModel.kt @@ -6,7 +6,7 @@ import androidx.lifecycle.Transformations import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.shared.interfaces.ResourceHelper -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.androidaps.plugins.pump.eopatch.R import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPatchManager import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPreferenceManager diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt index 6c45c97847..1e37bd6d98 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt @@ -7,7 +7,7 @@ import android.os.IBinder import android.os.SystemClock import androidx.preference.Preference import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.CommandQueue @@ -59,8 +59,8 @@ import info.nightscout.interfaces.PluginDescription import info.nightscout.interfaces.PluginType import info.nightscout.interfaces.data.PumpEnactResult import info.nightscout.interfaces.notifications.Notification -import info.nightscout.interfaces.pump.ManufacturerType -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.ManufacturerType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.pump.actions.CustomAction import info.nightscout.interfaces.pump.actions.CustomActionType import info.nightscout.interfaces.utils.TimeChangeType diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicCommunicationManager.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicCommunicationManager.kt index 703a2c5c16..4a2a20d407 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicCommunicationManager.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicCommunicationManager.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm import android.os.SystemClock -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicConverter.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicConverter.kt index 27dbf08dd2..91a08ae3e5 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicConverter.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicConverter.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BasalProfile import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BatteryStatusDTO import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.PumpSettingDTO diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt index eb9b886bbc..eb034fb824 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt @@ -3,11 +3,11 @@ package info.nightscout.androidaps.plugins.pump.medtronic.data import com.google.gson.Gson import com.google.gson.GsonBuilder import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntry import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntryBolus import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntryTBR diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BasalProfile.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BasalProfile.kt index b420030fde..19e557a96f 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BasalProfile.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BasalProfile.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.medtronic.data.dto import com.google.gson.annotations.Expose -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.pump.core.utils.ByteUtil import info.nightscout.rx.logging.AAPSLogger diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/driver/MedtronicPumpStatus.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/driver/MedtronicPumpStatus.kt index fb3dd00804..13b96f1b89 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/driver/MedtronicPumpStatus.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/driver/MedtronicPumpStatus.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.medtronic.driver -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.data.RLHistoryItem diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt index 70546aa3fe..4df111bcc9 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt @@ -5,7 +5,7 @@ import android.os.Handler import android.os.HandlerThread import android.text.format.DateFormat import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.androidaps.events.EventPreferenceChange import info.nightscout.androidaps.extensions.convertedToAbsolute @@ -57,9 +57,9 @@ import info.nightscout.interfaces.PluginDescription import info.nightscout.interfaces.PluginType import info.nightscout.interfaces.data.PumpEnactResult import info.nightscout.interfaces.notifications.Notification -import info.nightscout.interfaces.pump.ManufacturerType -import info.nightscout.interfaces.pump.PumpDescription -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.ManufacturerType +import info.nightscout.interfaces.pump.defs.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.pump.actions.CustomAction import info.nightscout.interfaces.pump.actions.CustomActionType import info.nightscout.interfaces.queue.CustomCommand diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManager.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManager.kt index e09fa9cf56..05efe00d2a 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManager.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManager.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.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.pod.definition.* diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt index 179b1004f4..b28bbc8036 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt @@ -2,7 +2,7 @@ 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.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.plugins.pump.omnipod.dash.EventOmnipodDashPumpValuesChanged import info.nightscout.androidaps.plugins.pump.omnipod.dash.R import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Id diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/history/data/Record.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/history/data/Record.kt index f129ab292d..3e2f28ed39 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/history/data/Record.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/history/data/Record.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.interfaces.Profile sealed class Record @@ -25,7 +25,7 @@ enum class BolusType { fun fromBolusInfoBolusType(type: DetailedBolusInfo.BolusType): BolusType { return when (type) { DetailedBolusInfo.BolusType.SMB -> SMB - else -> DEFAULT + else -> DEFAULT } } } diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodHistoryActivity.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodHistoryActivity.kt index 893dd59b67..b6971c0c1b 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodHistoryActivity.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodHistoryActivity.kt @@ -13,7 +13,7 @@ import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import info.nightscout.androidaps.activities.NoSplashAppCompatActivity import info.nightscout.androidaps.plugins.pump.common.defs.PumpHistoryEntryGroup -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.common.utils.ProfileUtil import info.nightscout.androidaps.plugins.pump.omnipod.common.definition.OmnipodCommandType diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt index 016313ed48..45ce5dc07a 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt @@ -2,7 +2,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.activatio import androidx.annotation.StringRes import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.PumpSync @@ -22,7 +22,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.mapProfileToBas import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.interfaces.data.PumpEnactResult import info.nightscout.interfaces.notifications.Notification -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/util/Functions.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/util/Functions.kt index f4f95f7f03..59c5f28119 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/util/Functions.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/util/Functions.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.util import info.nightscout.androidaps.interfaces.Profile -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.BasalProgram import java.util.* import kotlin.math.roundToInt diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java index 80c8001410..c808ce0162 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java @@ -34,7 +34,8 @@ import javax.inject.Inject; import javax.inject.Singleton; import dagger.android.HasAndroidInjector; -import info.nightscout.androidaps.data.DetailedBolusInfo; +import info.nightscout.core.pumpExtensions.DetailedBolusInfoExtensionKt; +import info.nightscout.interfaces.pump.DetailedBolusInfo; import info.nightscout.androidaps.data.PumpEnactResultImpl; import info.nightscout.androidaps.events.EventPreferenceChange; import info.nightscout.androidaps.interfaces.ActivePlugin; @@ -94,9 +95,9 @@ import info.nightscout.interfaces.PluginDescription; import info.nightscout.interfaces.PluginType; import info.nightscout.interfaces.data.PumpEnactResult; import info.nightscout.interfaces.notifications.Notification; -import info.nightscout.interfaces.pump.ManufacturerType; -import info.nightscout.interfaces.pump.PumpDescription; -import info.nightscout.interfaces.pump.PumpType; +import info.nightscout.interfaces.pump.defs.ManufacturerType; +import info.nightscout.interfaces.pump.defs.PumpDescription; +import info.nightscout.interfaces.pump.defs.PumpType; import info.nightscout.interfaces.pump.actions.CustomActionType; import info.nightscout.interfaces.queue.Callback; import info.nightscout.interfaces.queue.CustomCommand; @@ -366,7 +367,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements Pump, Riley String activeBolusString = sp.getString(OmnipodErosStorageKeys.Preferences.ACTIVE_BOLUS, ""); aapsLogger.warn(LTag.PUMP, "Found active bolus in SP: {}. Adding Treatment.", activeBolusString); try { - aapsOmnipodErosManager.addBolusToHistory(DetailedBolusInfo.Companion.fromJsonString(activeBolusString)); + aapsOmnipodErosManager.addBolusToHistory(DetailedBolusInfoExtensionKt.fromJsonString(new DetailedBolusInfo(), activeBolusString)); } catch (Exception ex) { aapsLogger.error(LTag.PUMP, "Failed to add active bolus to history", ex); } diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java index ac72260156..9511e6fd61 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java @@ -14,14 +14,12 @@ import javax.inject.Inject; import javax.inject.Singleton; import dagger.android.HasAndroidInjector; -import info.nightscout.androidaps.data.DetailedBolusInfo; import info.nightscout.androidaps.data.PumpEnactResultImpl; import info.nightscout.androidaps.extensions.PumpStateExtensionKt; import info.nightscout.androidaps.interfaces.Profile; import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; -import info.nightscout.interfaces.pump.PumpType; import info.nightscout.androidaps.plugins.pump.common.defs.TempBasalPair; import info.nightscout.androidaps.plugins.pump.omnipod.common.definition.OmnipodCommandType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.R; @@ -69,9 +67,12 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.history.database.Ero import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.manager.OmnipodRileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.AapsOmnipodUtil; import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.OmnipodAlertUtil; +import info.nightscout.core.pumpExtensions.DetailedBolusInfoExtensionKt; import info.nightscout.interfaces.ActivityNames; import info.nightscout.interfaces.data.PumpEnactResult; import info.nightscout.interfaces.notifications.Notification; +import info.nightscout.interfaces.pump.DetailedBolusInfo; +import info.nightscout.interfaces.pump.defs.PumpType; import info.nightscout.pump.core.utils.ByteUtil; import info.nightscout.rx.AapsSchedulers; import info.nightscout.rx.bus.RxBus; @@ -426,7 +427,7 @@ public class AapsOmnipodErosManager { // // I discussed this with the AAPS team but nobody seems to care so we're stuck with this ugly workaround for now try { - sp.putString(OmnipodErosStorageKeys.Preferences.ACTIVE_BOLUS, detailedBolusInfo.toJsonString()); + sp.putString(OmnipodErosStorageKeys.Preferences.ACTIVE_BOLUS, DetailedBolusInfoExtensionKt.toJsonString(detailedBolusInfo)); aapsLogger.debug(LTag.PUMP, "Stored active bolus to SP for recovery"); } catch (Exception ex) { aapsLogger.error(LTag.PUMP, "Failed to store active bolus to SP", ex); diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodHistoryActivity.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodHistoryActivity.java index c50760d2e5..1d6f816f83 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodHistoryActivity.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodHistoryActivity.java @@ -26,7 +26,7 @@ import info.nightscout.androidaps.activities.NoSplashAppCompatActivity; import info.nightscout.androidaps.interfaces.Profile; import info.nightscout.shared.interfaces.ResourceHelper; import info.nightscout.androidaps.plugins.pump.common.defs.PumpHistoryEntryGroup; -import info.nightscout.interfaces.pump.PumpType; +import info.nightscout.interfaces.pump.defs.PumpType; import info.nightscout.androidaps.plugins.pump.common.defs.TempBasalPair; import info.nightscout.androidaps.plugins.pump.common.utils.ProfileUtil; import info.nightscout.androidaps.plugins.pump.omnipod.eros.R; diff --git a/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPluginTest.kt b/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPluginTest.kt index 8cf44d746e..41926f97d0 100644 --- a/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPluginTest.kt +++ b/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPluginTest.kt @@ -10,7 +10,7 @@ import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.shared.interfaces.ResourceHelper -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.defs.TempBasalPair import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodErosManager diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.kt index b07988cb07..42275f8ca3 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.kt @@ -6,7 +6,7 @@ import android.content.ServiceConnection import android.text.format.DateFormat import com.google.gson.GsonBuilder import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResultImpl import info.nightscout.androidaps.extensions.convertedToAbsolute import info.nightscout.androidaps.extensions.plannedRemainingMinutes @@ -28,9 +28,9 @@ import info.nightscout.androidaps.utils.DecimalFormatter.to2Decimal import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.interfaces.PluginDescription import info.nightscout.interfaces.data.PumpEnactResult -import info.nightscout.interfaces.pump.ManufacturerType -import info.nightscout.interfaces.pump.PumpDescription -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.ManufacturerType +import info.nightscout.interfaces.pump.defs.PumpDescription +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.bus.RxBus import info.nightscout.rx.events.EventAppExit diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/data/PumpStatus.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/data/PumpStatus.kt index d1b1f40fc9..8bcd1816ae 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/data/PumpStatus.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/data/PumpStatus.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.common.data import info.nightscout.androidaps.plugins.pump.common.defs.PumpRunningState -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import java.util.* /** diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpDbEntry.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpDbEntry.kt index d2ae0a4616..5212bd1567 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpDbEntry.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpDbEntry.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.plugins.pump.common.sync -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType // data class PumpDbEntry constructor(var temporaryId: Long, // var date: Long, @@ -62,10 +62,11 @@ data class PumpDbEntryBolus(override var temporaryId: Long, date: Long, pumpType: PumpType, serialNumber: String, - detailedBolusInfo: DetailedBolusInfo) : this(temporaryId, date, pumpType, serialNumber, null, - detailedBolusInfo.insulin, - detailedBolusInfo.carbs, - detailedBolusInfo.bolusType) + detailedBolusInfo: DetailedBolusInfo + ) : this(temporaryId, date, pumpType, serialNumber, null, + detailedBolusInfo.insulin, + detailedBolusInfo.carbs, + detailedBolusInfo.bolusType) } diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpSyncEntriesCreator.java b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpSyncEntriesCreator.java index 40d409938f..7682e0993d 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpSyncEntriesCreator.java +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpSyncEntriesCreator.java @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.common.sync; -import info.nightscout.interfaces.pump.PumpType; +import info.nightscout.interfaces.pump.defs.PumpType; public interface PumpSyncEntriesCreator { diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpSyncStorage.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpSyncStorage.kt index a45ab5b8cf..c6adc55e4d 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpSyncStorage.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpSyncStorage.kt @@ -2,7 +2,7 @@ package info.nightscout.androidaps.plugins.pump.common.sync import com.thoughtworks.xstream.XStream import com.thoughtworks.xstream.security.AnyTypePermission -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/utils/ProfileUtil.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/utils/ProfileUtil.kt index bf6f2f7045..5dbb5bef04 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/utils/ProfileUtil.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/utils/ProfileUtil.kt @@ -2,7 +2,7 @@ package info.nightscout.androidaps.plugins.pump.common.utils import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.Profile.ProfileValue -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import java.util.* object ProfileUtil { diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/InitializePumpManagerTask.kt b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/InitializePumpManagerTask.kt index bc5c44b674..4b17eff0f1 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/InitializePumpManagerTask.kt +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/InitializePumpManagerTask.kt @@ -2,7 +2,7 @@ package info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.task import android.content.Context import dagger.android.HasAndroidInjector -import info.nightscout.interfaces.pump.ManufacturerType +import info.nightscout.interfaces.pump.defs.ManufacturerType import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkTargetFrequency diff --git a/ui/src/main/java/info/nightscout/ui/activities/TDDStatsActivity.kt b/ui/src/main/java/info/nightscout/ui/activities/TDDStatsActivity.kt index f2d6d404fe..3e6cb5a87f 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/TDDStatsActivity.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/TDDStatsActivity.kt @@ -24,7 +24,7 @@ import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.main.R import info.nightscout.database.entities.TotalDailyDose -import info.nightscout.interfaces.pump.PumpType +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.interfaces.queue.Callback import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.events.EventDanaRSyncStatus diff --git a/ui/src/main/java/info/nightscout/ui/dialogs/CarbsDialog.kt b/ui/src/main/java/info/nightscout/ui/dialogs/CarbsDialog.kt index 9ee87d9378..b407ea9ccb 100644 --- a/ui/src/main/java/info/nightscout/ui/dialogs/CarbsDialog.kt +++ b/ui/src/main/java/info/nightscout/ui/dialogs/CarbsDialog.kt @@ -8,7 +8,7 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import com.google.common.base.Joiner -import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.interfaces.pump.DetailedBolusInfo import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction import info.nightscout.androidaps.dialogs.DialogFragmentWithDate diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/EmptyRecyclerView.kt b/ui/src/main/java/info/nightscout/ui/elements/EmptyRecyclerView.kt similarity index 98% rename from core/core-main/src/main/java/info/nightscout/androidaps/extensions/EmptyRecyclerView.kt rename to ui/src/main/java/info/nightscout/ui/elements/EmptyRecyclerView.kt index 6bb2afac9b..a44252a0ca 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/EmptyRecyclerView.kt +++ b/ui/src/main/java/info/nightscout/ui/elements/EmptyRecyclerView.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.extensions +package info.nightscout.ui.elements import android.content.Context import android.util.AttributeSet diff --git a/ui/src/main/res/layout/treatments_bolus_carbs_fragment.xml b/ui/src/main/res/layout/treatments_bolus_carbs_fragment.xml index 3628148475..30c3c21f66 100644 --- a/ui/src/main/res/layout/treatments_bolus_carbs_fragment.xml +++ b/ui/src/main/res/layout/treatments_bolus_carbs_fragment.xml @@ -23,7 +23,7 @@ android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:visibility="gone" /> - - - - - - -