rename CommandQueue
This commit is contained in:
parent
e14fc44957
commit
0db34981d4
|
@ -22,7 +22,7 @@ import info.nightscout.androidaps.plugins.general.nsclient.data.DeviceStatusData
|
|||
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin
|
||||
import info.nightscout.androidaps.plugins.pump.PumpSyncImplementation
|
||||
import info.nightscout.androidaps.queue.CommandQueue
|
||||
import info.nightscout.androidaps.queue.CommandQueueImplementation
|
||||
import info.nightscout.androidaps.utils.DateUtil
|
||||
import info.nightscout.androidaps.utils.FabricPrivacy
|
||||
import info.nightscout.androidaps.utils.HardLimits
|
||||
|
@ -89,8 +89,8 @@ open class AppModule {
|
|||
|
||||
@Binds fun bindContext(mainApp: MainApp): Context
|
||||
@Binds fun bindInjector(mainApp: MainApp): HasAndroidInjector
|
||||
@Binds fun bindActivePluginProvider(pluginStore: PluginStore): ActivePlugin
|
||||
@Binds fun bindCommandQueueProvider(commandQueue: CommandQueue): CommandQueueProvider
|
||||
@Binds fun bindActivePlugin(pluginStore: PluginStore): ActivePlugin
|
||||
@Binds fun bindCommandQueue(commandQueue: CommandQueueImplementation): CommandQueue
|
||||
@Binds fun bindConfigInterface(config: ConfigImpl): Config
|
||||
|
||||
@Binds fun bindConfigBuilderInterface(configBuilderPlugin: ConfigBuilderPlugin): ConfigBuilder
|
||||
|
|
|
@ -2,14 +2,14 @@ package info.nightscout.androidaps.dependencyInjection
|
|||
|
||||
import dagger.Module
|
||||
import dagger.android.ContributesAndroidInjector
|
||||
import info.nightscout.androidaps.queue.CommandQueue
|
||||
import info.nightscout.androidaps.queue.CommandQueueImplementation
|
||||
import info.nightscout.androidaps.queue.commands.*
|
||||
|
||||
@Module
|
||||
@Suppress("unused")
|
||||
abstract class CommandQueueModule {
|
||||
|
||||
@ContributesAndroidInjector abstract fun commandQueueInjector(): CommandQueue
|
||||
@ContributesAndroidInjector abstract fun commandQueueInjector(): CommandQueueImplementation
|
||||
@ContributesAndroidInjector abstract fun commandBolusInjector(): CommandBolus
|
||||
@ContributesAndroidInjector abstract fun commandCancelExtendedBolusInjector(): CommandCancelExtendedBolus
|
||||
@ContributesAndroidInjector abstract fun commandCancelTempBasalInjector(): CommandCancelTempBasal
|
||||
|
|
|
@ -11,7 +11,6 @@ import com.google.common.base.Joiner
|
|||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.activities.ErrorHelperActivity
|
||||
import info.nightscout.androidaps.data.DetailedBolusInfo
|
||||
import info.nightscout.androidaps.interfaces.Profile
|
||||
import info.nightscout.androidaps.database.AppRepository
|
||||
import info.nightscout.androidaps.database.entities.TemporaryTarget
|
||||
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||
|
@ -20,16 +19,12 @@ import info.nightscout.androidaps.database.entities.ValueWithUnit
|
|||
import info.nightscout.androidaps.database.transactions.InsertAndCancelCurrentTemporaryTargetTransaction
|
||||
import info.nightscout.androidaps.databinding.DialogCarbsBinding
|
||||
import info.nightscout.androidaps.extensions.formatColor
|
||||
import info.nightscout.androidaps.interfaces.Constraint
|
||||
import info.nightscout.androidaps.interfaces.GlucoseUnit
|
||||
import info.nightscout.androidaps.interfaces.IobCobCalculator
|
||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||
import info.nightscout.androidaps.interfaces.*
|
||||
import info.nightscout.androidaps.logging.LTag
|
||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider
|
||||
import info.nightscout.androidaps.queue.Callback
|
||||
import info.nightscout.androidaps.queue.CommandQueue
|
||||
import info.nightscout.androidaps.utils.*
|
||||
import info.nightscout.androidaps.utils.alertDialogs.OKDialog
|
||||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
||||
|
@ -104,8 +99,10 @@ class CarbsDialog : DialogFragmentWithDate() {
|
|||
savedInstanceState.putDouble("carbs", binding.carbs.value)
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?): View {
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
onCreateViewGeneral()
|
||||
_binding = DialogCarbsBinding.inflate(inflater, container, false)
|
||||
return binding.root
|
||||
|
@ -120,33 +117,45 @@ class CarbsDialog : DialogFragmentWithDate() {
|
|||
}
|
||||
}
|
||||
val maxCarbs = constraintChecker.getMaxCarbsAllowed().value().toDouble()
|
||||
binding.time.setParams(savedInstanceState?.getDouble("time")
|
||||
?: 0.0, -12 * 60.0, 12 * 60.0, 5.0, DecimalFormat("0"), false, binding.okcancel.ok, textWatcher)
|
||||
binding.time.setParams(
|
||||
savedInstanceState?.getDouble("time")
|
||||
?: 0.0, -12 * 60.0, 12 * 60.0, 5.0, DecimalFormat("0"), false, binding.okcancel.ok, textWatcher
|
||||
)
|
||||
|
||||
binding.duration.setParams(savedInstanceState?.getDouble("duration")
|
||||
?: 0.0, 0.0, 10.0, 1.0, DecimalFormat("0"), false, binding.okcancel.ok, textWatcher)
|
||||
binding.duration.setParams(
|
||||
savedInstanceState?.getDouble("duration")
|
||||
?: 0.0, 0.0, 10.0, 1.0, DecimalFormat("0"), false, binding.okcancel.ok, textWatcher
|
||||
)
|
||||
|
||||
binding.carbs.setParams(savedInstanceState?.getDouble("carbs")
|
||||
?: 0.0, 0.0, maxCarbs, 1.0, DecimalFormat("0"), false, binding.okcancel.ok, textWatcher)
|
||||
binding.carbs.setParams(
|
||||
savedInstanceState?.getDouble("carbs")
|
||||
?: 0.0, 0.0, maxCarbs, 1.0, DecimalFormat("0"), false, binding.okcancel.ok, textWatcher
|
||||
)
|
||||
|
||||
binding.plus1.text = toSignedString(sp.getInt(R.string.key_carbs_button_increment_1, FAV1_DEFAULT))
|
||||
binding.plus1.setOnClickListener {
|
||||
binding.carbs.value = max(0.0, binding.carbs.value
|
||||
+ sp.getInt(R.string.key_carbs_button_increment_1, FAV1_DEFAULT))
|
||||
binding.carbs.value = max(
|
||||
0.0, binding.carbs.value
|
||||
+ sp.getInt(R.string.key_carbs_button_increment_1, FAV1_DEFAULT)
|
||||
)
|
||||
validateInputs()
|
||||
}
|
||||
|
||||
binding.plus2.text = toSignedString(sp.getInt(R.string.key_carbs_button_increment_2, FAV2_DEFAULT))
|
||||
binding.plus2.setOnClickListener {
|
||||
binding.carbs.value = max(0.0, binding.carbs.value
|
||||
+ sp.getInt(R.string.key_carbs_button_increment_2, FAV2_DEFAULT))
|
||||
binding.carbs.value = max(
|
||||
0.0, binding.carbs.value
|
||||
+ sp.getInt(R.string.key_carbs_button_increment_2, FAV2_DEFAULT)
|
||||
)
|
||||
validateInputs()
|
||||
}
|
||||
|
||||
binding.plus3.text = toSignedString(sp.getInt(R.string.key_carbs_button_increment_3, FAV3_DEFAULT))
|
||||
binding.plus3.setOnClickListener {
|
||||
binding.carbs.value = max(0.0, binding.carbs.value
|
||||
+ sp.getInt(R.string.key_carbs_button_increment_3, FAV3_DEFAULT))
|
||||
binding.carbs.value = max(
|
||||
0.0, binding.carbs.value
|
||||
+ sp.getInt(R.string.key_carbs_button_increment_3, FAV3_DEFAULT)
|
||||
)
|
||||
validateInputs()
|
||||
}
|
||||
|
||||
|
@ -196,13 +205,28 @@ class CarbsDialog : DialogFragmentWithDate() {
|
|||
|
||||
val activitySelected = binding.activityTt.isChecked
|
||||
if (activitySelected)
|
||||
actions.add(rh.gs(R.string.temptargetshort) + ": " + (DecimalFormatter.to1Decimal(activityTT) + " " + unitLabel + " (" + rh.gs(R.string.format_mins, activityTTDuration) + ")").formatColor(rh, R.color.tempTargetConfirmation))
|
||||
actions.add(
|
||||
rh.gs(R.string.temptargetshort) + ": " + (DecimalFormatter.to1Decimal(activityTT) + " " + unitLabel + " (" + rh.gs(R.string.format_mins, activityTTDuration) + ")").formatColor(
|
||||
rh,
|
||||
R.color.tempTargetConfirmation
|
||||
)
|
||||
)
|
||||
val eatingSoonSelected = binding.eatingSoonTt.isChecked
|
||||
if (eatingSoonSelected)
|
||||
actions.add(rh.gs(R.string.temptargetshort) + ": " + (DecimalFormatter.to1Decimal(eatingSoonTT) + " " + unitLabel + " (" + rh.gs(R.string.format_mins, eatingSoonTTDuration) + ")").formatColor(rh, R.color.tempTargetConfirmation))
|
||||
actions.add(
|
||||
rh.gs(R.string.temptargetshort) + ": " + (DecimalFormatter.to1Decimal(eatingSoonTT) + " " + unitLabel + " (" + rh.gs(
|
||||
R.string.format_mins,
|
||||
eatingSoonTTDuration
|
||||
) + ")").formatColor(rh, R.color.tempTargetConfirmation)
|
||||
)
|
||||
val hypoSelected = binding.hypoTt.isChecked
|
||||
if (hypoSelected)
|
||||
actions.add(rh.gs(R.string.temptargetshort) + ": " + (DecimalFormatter.to1Decimal(hypoTT) + " " + unitLabel + " (" + rh.gs(R.string.format_mins, hypoTTDuration) + ")").formatColor(rh, R.color.tempTargetConfirmation))
|
||||
actions.add(
|
||||
rh.gs(R.string.temptargetshort) + ": " + (DecimalFormatter.to1Decimal(hypoTT) + " " + unitLabel + " (" + rh.gs(R.string.format_mins, hypoTTDuration) + ")").formatColor(
|
||||
rh,
|
||||
R.color.tempTargetConfirmation
|
||||
)
|
||||
)
|
||||
|
||||
val timeOffset = binding.time.value.toInt()
|
||||
eventTime -= eventTime % 1000
|
||||
|
@ -231,17 +255,21 @@ class CarbsDialog : DialogFragmentWithDate() {
|
|||
OKDialog.showConfirmation(activity, rh.gs(R.string.carbs), HtmlHelper.fromHtml(Joiner.on("<br/>").join(actions)), {
|
||||
when {
|
||||
activitySelected -> {
|
||||
uel.log(Action.TT, Sources.CarbDialog,
|
||||
uel.log(
|
||||
Action.TT, Sources.CarbDialog,
|
||||
ValueWithUnit.TherapyEventTTReason(TemporaryTarget.Reason.ACTIVITY),
|
||||
ValueWithUnit.fromGlucoseUnit(activityTT, units.asText),
|
||||
ValueWithUnit.Minute(activityTTDuration))
|
||||
disposable += repository.runTransactionForResult(InsertAndCancelCurrentTemporaryTargetTransaction(
|
||||
ValueWithUnit.Minute(activityTTDuration)
|
||||
)
|
||||
disposable += repository.runTransactionForResult(
|
||||
InsertAndCancelCurrentTemporaryTargetTransaction(
|
||||
timestamp = System.currentTimeMillis(),
|
||||
duration = TimeUnit.MINUTES.toMillis(activityTTDuration.toLong()),
|
||||
reason = TemporaryTarget.Reason.ACTIVITY,
|
||||
lowTarget = Profile.toMgdl(activityTT, profileFunction.getUnits()),
|
||||
highTarget = Profile.toMgdl(activityTT, profileFunction.getUnits())
|
||||
)).subscribe({ result ->
|
||||
)
|
||||
).subscribe({ result ->
|
||||
result.inserted.forEach { aapsLogger.debug(LTag.DATABASE, "Inserted temp target $it") }
|
||||
result.updated.forEach { aapsLogger.debug(LTag.DATABASE, "Updated temp target $it") }
|
||||
}, {
|
||||
|
@ -250,17 +278,21 @@ class CarbsDialog : DialogFragmentWithDate() {
|
|||
}
|
||||
|
||||
eatingSoonSelected -> {
|
||||
uel.log(Action.TT, Sources.CarbDialog,
|
||||
uel.log(
|
||||
Action.TT, Sources.CarbDialog,
|
||||
ValueWithUnit.TherapyEventTTReason(TemporaryTarget.Reason.EATING_SOON),
|
||||
ValueWithUnit.fromGlucoseUnit(eatingSoonTT, units.asText),
|
||||
ValueWithUnit.Minute(eatingSoonTTDuration))
|
||||
disposable += repository.runTransactionForResult(InsertAndCancelCurrentTemporaryTargetTransaction(
|
||||
ValueWithUnit.Minute(eatingSoonTTDuration)
|
||||
)
|
||||
disposable += repository.runTransactionForResult(
|
||||
InsertAndCancelCurrentTemporaryTargetTransaction(
|
||||
timestamp = System.currentTimeMillis(),
|
||||
duration = TimeUnit.MINUTES.toMillis(eatingSoonTTDuration.toLong()),
|
||||
reason = TemporaryTarget.Reason.EATING_SOON,
|
||||
lowTarget = Profile.toMgdl(eatingSoonTT, profileFunction.getUnits()),
|
||||
highTarget = Profile.toMgdl(eatingSoonTT, profileFunction.getUnits())
|
||||
)).subscribe({ result ->
|
||||
)
|
||||
).subscribe({ result ->
|
||||
result.inserted.forEach { aapsLogger.debug(LTag.DATABASE, "Inserted temp target $it") }
|
||||
result.updated.forEach { aapsLogger.debug(LTag.DATABASE, "Updated temp target $it") }
|
||||
}, {
|
||||
|
@ -269,17 +301,21 @@ class CarbsDialog : DialogFragmentWithDate() {
|
|||
}
|
||||
|
||||
hypoSelected -> {
|
||||
uel.log(Action.TT, Sources.CarbDialog,
|
||||
uel.log(
|
||||
Action.TT, Sources.CarbDialog,
|
||||
ValueWithUnit.TherapyEventTTReason(TemporaryTarget.Reason.HYPOGLYCEMIA),
|
||||
ValueWithUnit.fromGlucoseUnit(hypoTT, units.asText),
|
||||
ValueWithUnit.Minute(hypoTTDuration))
|
||||
disposable += repository.runTransactionForResult(InsertAndCancelCurrentTemporaryTargetTransaction(
|
||||
ValueWithUnit.Minute(hypoTTDuration)
|
||||
)
|
||||
disposable += repository.runTransactionForResult(
|
||||
InsertAndCancelCurrentTemporaryTargetTransaction(
|
||||
timestamp = System.currentTimeMillis(),
|
||||
duration = TimeUnit.MINUTES.toMillis(hypoTTDuration.toLong()),
|
||||
reason = TemporaryTarget.Reason.HYPOGLYCEMIA,
|
||||
lowTarget = Profile.toMgdl(hypoTT, profileFunction.getUnits()),
|
||||
highTarget = Profile.toMgdl(hypoTT, profileFunction.getUnits())
|
||||
)).subscribe({ result ->
|
||||
)
|
||||
).subscribe({ result ->
|
||||
result.inserted.forEach { aapsLogger.debug(LTag.DATABASE, "Inserted temp target $it") }
|
||||
result.updated.forEach { aapsLogger.debug(LTag.DATABASE, "Updated temp target $it") }
|
||||
}, {
|
||||
|
|
|
@ -13,7 +13,7 @@ import info.nightscout.androidaps.database.entities.UserEntry.Action
|
|||
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||
import info.nightscout.androidaps.databinding.DialogExtendedbolusBinding
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.Constraint
|
||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
|
||||
|
@ -33,7 +33,7 @@ class ExtendedBolusDialog : DialogFragmentWithDate() {
|
|||
@Inject lateinit var ctx: Context
|
||||
@Inject lateinit var rh: ResourceHelper
|
||||
@Inject lateinit var constraintChecker: ConstraintChecker
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var uel: UserEntryLogger
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
|||
import info.nightscout.androidaps.database.transactions.InsertIfNewByTimestampTherapyEventTransaction
|
||||
import info.nightscout.androidaps.databinding.DialogFillBinding
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.Constraint
|
||||
import info.nightscout.androidaps.logging.LTag
|
||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||
|
@ -40,7 +40,7 @@ class FillDialog : DialogFragmentWithDate() {
|
|||
@Inject lateinit var constraintChecker: ConstraintChecker
|
||||
@Inject lateinit var rh: ResourceHelper
|
||||
@Inject lateinit var ctx: Context
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var uel: UserEntryLogger
|
||||
@Inject lateinit var repository: AppRepository
|
||||
|
|
|
@ -44,7 +44,7 @@ class InsulinDialog : DialogFragmentWithDate() {
|
|||
@Inject lateinit var rh: ResourceHelper
|
||||
@Inject lateinit var defaultValueHelper: DefaultValueHelper
|
||||
@Inject lateinit var profileFunction: ProfileFunction
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var ctx: Context
|
||||
@Inject lateinit var repository: AppRepository
|
||||
|
|
|
@ -56,7 +56,7 @@ class LoopDialog : DaggerDialogFragment() {
|
|||
@Inject lateinit var loopPlugin: LoopPlugin
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var constraintChecker: ConstraintChecker
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var configBuilder: ConfigBuilder
|
||||
@Inject lateinit var uel: UserEntryLogger
|
||||
@Inject lateinit var dateUtil: DateUtil
|
||||
|
|
|
@ -32,7 +32,7 @@ class TempBasalDialog : DialogFragmentWithDate() {
|
|||
@Inject lateinit var rh: ResourceHelper
|
||||
@Inject lateinit var profileFunction: ProfileFunction
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var ctx: Context
|
||||
@Inject lateinit var uel: UserEntryLogger
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import info.nightscout.androidaps.database.entities.UserEntry.Action
|
|||
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||
import info.nightscout.androidaps.databinding.DialogTreatmentBinding
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.Constraint
|
||||
import info.nightscout.androidaps.logging.LTag
|
||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||
|
@ -43,7 +43,7 @@ class TreatmentDialog : DialogFragmentWithDate() {
|
|||
@Inject lateinit var constraintChecker: ConstraintChecker
|
||||
@Inject lateinit var rh: ResourceHelper
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var ctx: Context
|
||||
@Inject lateinit var config: Config
|
||||
@Inject lateinit var uel: UserEntryLogger
|
||||
|
|
|
@ -78,7 +78,7 @@ class LoopPlugin @Inject constructor(
|
|||
rh: ResourceHelper,
|
||||
private val profileFunction: ProfileFunction,
|
||||
private val context: Context,
|
||||
private val commandQueue: CommandQueueProvider,
|
||||
private val commandQueue: CommandQueue,
|
||||
private val activePlugin: ActivePlugin,
|
||||
private val virtualPumpPlugin: VirtualPumpPlugin,
|
||||
private val iobCobCalculator: IobCobCalculator,
|
||||
|
|
|
@ -31,7 +31,7 @@ import info.nightscout.androidaps.extensions.toVisibility
|
|||
import info.nightscout.androidaps.activities.HistoryBrowseActivity
|
||||
import info.nightscout.androidaps.diaconn.DiaconnG8Plugin
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.Config
|
||||
import info.nightscout.androidaps.interfaces.IobCobCalculator
|
||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||
|
@ -72,7 +72,7 @@ class ActionsFragment : DaggerFragment() {
|
|||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var iobCobCalculator: IobCobCalculator
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var buildHelper: BuildHelper
|
||||
@Inject lateinit var protectionCheck: ProtectionCheck
|
||||
@Inject lateinit var skinProvider: SkinProvider
|
||||
|
|
|
@ -62,7 +62,6 @@ import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProv
|
|||
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
|
||||
import info.nightscout.androidaps.plugins.source.DexcomPlugin
|
||||
import info.nightscout.androidaps.plugins.source.XdripPlugin
|
||||
import info.nightscout.androidaps.queue.CommandQueue
|
||||
import info.nightscout.androidaps.skins.SkinProvider
|
||||
import info.nightscout.androidaps.utils.DateUtil
|
||||
import info.nightscout.androidaps.utils.DefaultValueHelper
|
||||
|
|
|
@ -4,7 +4,7 @@ import android.os.SystemClock
|
|||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.Constants
|
||||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.logging.LTag
|
||||
import info.nightscout.androidaps.plugins.general.smsCommunicator.otp.OneTimePassword
|
||||
|
@ -26,7 +26,7 @@ class AuthRequest internal constructor(
|
|||
@Inject lateinit var rh: ResourceHelper
|
||||
@Inject lateinit var otp: OneTimePassword
|
||||
@Inject lateinit var dateUtil: DateUtil
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
|
||||
private var date = 0L
|
||||
private var processed = false
|
||||
|
|
|
@ -74,7 +74,7 @@ class SmsCommunicatorPlugin @Inject constructor(
|
|||
private val profileFunction: ProfileFunction,
|
||||
private val fabricPrivacy: FabricPrivacy,
|
||||
private val activePlugin: ActivePlugin,
|
||||
private val commandQueue: CommandQueueProvider,
|
||||
private val commandQueue: CommandQueue,
|
||||
private val loop: Loop,
|
||||
private val iobCobCalculator: IobCobCalculator,
|
||||
private val xdripCalibrations: XdripCalibrations,
|
||||
|
|
|
@ -67,7 +67,7 @@ class ActionStringHandler @Inject constructor(
|
|||
private val loopPlugin: LoopPlugin,
|
||||
private val wearPlugin: WearPlugin,
|
||||
private val fabricPrivacy: FabricPrivacy,
|
||||
private val commandQueue: CommandQueueProvider,
|
||||
private val commandQueue: CommandQueue,
|
||||
private val activePlugin: ActivePlugin,
|
||||
private val iobCobCalculator: IobCobCalculator,
|
||||
private val localInsightPlugin: LocalInsightPlugin,
|
||||
|
|
|
@ -22,7 +22,7 @@ class MDIPlugin @Inject constructor(
|
|||
injector: HasAndroidInjector,
|
||||
aapsLogger: AAPSLogger,
|
||||
rh: ResourceHelper,
|
||||
commandQueue: CommandQueueProvider,
|
||||
commandQueue: CommandQueue,
|
||||
private val dateUtil: DateUtil,
|
||||
private val pumpSync: PumpSync
|
||||
) : PumpPluginBase(PluginDescription()
|
||||
|
|
|
@ -47,7 +47,7 @@ open class VirtualPumpPlugin @Inject constructor(
|
|||
private val sp: SP,
|
||||
private val profileFunction: ProfileFunction,
|
||||
private val iobCobCalculator: IobCobCalculator,
|
||||
commandQueue: CommandQueueProvider,
|
||||
commandQueue: CommandQueue,
|
||||
private val pumpSync: PumpSync,
|
||||
private val config: Config,
|
||||
private val dateUtil: DateUtil
|
||||
|
|
|
@ -49,7 +49,7 @@ import javax.inject.Singleton
|
|||
|
||||
@OpenForTesting
|
||||
@Singleton
|
||||
class CommandQueue @Inject constructor(
|
||||
class CommandQueueImplementation @Inject constructor(
|
||||
private val injector: HasAndroidInjector,
|
||||
private val aapsLogger: AAPSLogger,
|
||||
private val rxBus: RxBus,
|
||||
|
@ -65,7 +65,7 @@ class CommandQueue @Inject constructor(
|
|||
private val repository: AppRepository,
|
||||
private val fabricPrivacy: FabricPrivacy,
|
||||
private val config: Config
|
||||
) : CommandQueueProvider {
|
||||
) : CommandQueue {
|
||||
|
||||
private val disposable = CompositeDisposable()
|
||||
|
||||
|
@ -195,7 +195,7 @@ class CommandQueue @Inject constructor(
|
|||
|
||||
override fun independentConnect(reason: String, callback: Callback?) {
|
||||
aapsLogger.debug(LTag.PUMPQUEUE, "Starting new queue")
|
||||
val tempCommandQueue = CommandQueue(injector, aapsLogger, rxBus, aapsSchedulers, rh,
|
||||
val tempCommandQueue = CommandQueueImplementation(injector, aapsLogger, rxBus, aapsSchedulers, rh,
|
||||
constraintChecker, profileFunction, activePlugin, context, sp,
|
||||
buildHelper, dateUtil, repository, fabricPrivacy, config)
|
||||
tempCommandQueue.readStatus(reason, callback)
|
|
@ -18,7 +18,7 @@ import info.nightscout.androidaps.utils.resources.ResourceHelper
|
|||
import info.nightscout.androidaps.utils.sharedPreferences.SP
|
||||
|
||||
class QueueThread internal constructor(
|
||||
private val queue: CommandQueue,
|
||||
private val queue: CommandQueueImplementation,
|
||||
context: Context,
|
||||
private val aapsLogger: AAPSLogger,
|
||||
private val rxBus: RxBus,
|
||||
|
|
|
@ -5,7 +5,7 @@ import info.nightscout.androidaps.R
|
|||
import info.nightscout.androidaps.data.PumpEnactResult
|
||||
import info.nightscout.androidaps.database.ValueWrapper
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.Config
|
||||
import info.nightscout.androidaps.interfaces.PluginType
|
||||
import info.nightscout.androidaps.interfaces.Profile
|
||||
|
@ -25,7 +25,7 @@ class CommandSetProfile constructor(
|
|||
@Inject lateinit var smsCommunicatorPlugin: SmsCommunicatorPlugin
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var dateUtil: DateUtil
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var config: Config
|
||||
|
||||
override fun execute() {
|
||||
|
|
|
@ -18,7 +18,7 @@ import info.nightscout.androidaps.database.AppRepository
|
|||
import info.nightscout.androidaps.events.EventProfileSwitchChanged
|
||||
import info.nightscout.androidaps.extensions.buildDeviceStatus
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.IobCobCalculator
|
||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
|
@ -69,7 +69,7 @@ class KeepAliveReceiver : DaggerBroadcastReceiver() {
|
|||
@Inject lateinit var runningConfiguration: RunningConfiguration
|
||||
@Inject lateinit var receiverStatusStore: ReceiverStatusStore
|
||||
@Inject lateinit var rxBus: RxBus
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||
@Inject lateinit var maintenancePlugin: MaintenancePlugin
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class SWDefinition @Inject constructor(
|
|||
private val profileFunction: ProfileFunction,
|
||||
private val localProfilePlugin: LocalProfilePlugin,
|
||||
private val activePlugin: ActivePlugin,
|
||||
private val commandQueue: CommandQueueProvider,
|
||||
private val commandQueue: CommandQueue,
|
||||
private val objectivesPlugin: ObjectivesPlugin,
|
||||
private val configBuilder: ConfigBuilder,
|
||||
private val loopPlugin: LoopPlugin,
|
||||
|
|
|
@ -51,7 +51,7 @@ class BolusWizard @Inject constructor(
|
|||
@Inject lateinit var profileFunction: ProfileFunction
|
||||
@Inject lateinit var constraintChecker: ConstraintChecker
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var loopPlugin: LoopPlugin
|
||||
@Inject lateinit var iobCobCalculator: IobCobCalculator
|
||||
@Inject lateinit var dateUtil: DateUtil
|
||||
|
|
|
@ -47,7 +47,7 @@ class ConstraintsCheckerTest : TestBaseWithProfile() {
|
|||
@Mock lateinit var activePlugin: ActivePlugin
|
||||
@Mock lateinit var virtualPumpPlugin: VirtualPumpPlugin
|
||||
@Mock lateinit var sp: SP
|
||||
@Mock lateinit var commandQueue: CommandQueueProvider
|
||||
@Mock lateinit var commandQueue: CommandQueue
|
||||
@Mock lateinit var detailedBolusInfoStorage: DetailedBolusInfoStorage
|
||||
@Mock lateinit var temporaryBasalStorage: TemporaryBasalStorage
|
||||
@Mock lateinit var glimpPlugin: GlimpPlugin
|
||||
|
|
|
@ -33,7 +33,7 @@ class LoopPluginTest : TestBase() {
|
|||
@Mock lateinit var rh: ResourceHelper
|
||||
@Mock lateinit var profileFunction: ProfileFunction
|
||||
@Mock lateinit var context: Context
|
||||
@Mock lateinit var commandQueue: CommandQueueProvider
|
||||
@Mock lateinit var commandQueue: CommandQueue
|
||||
@Mock lateinit var activePlugin: ActivePlugin
|
||||
@Mock lateinit var virtualPumpPlugin: VirtualPumpPlugin
|
||||
@Mock lateinit var iobCobCalculator: IobCobCalculator
|
||||
|
|
|
@ -50,7 +50,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
|
|||
@Mock lateinit var sp: SP
|
||||
@Mock lateinit var constraintChecker: ConstraintChecker
|
||||
@Mock lateinit var activePlugin: ActivePlugin
|
||||
@Mock lateinit var commandQueue: CommandQueueProvider
|
||||
@Mock lateinit var commandQueue: CommandQueue
|
||||
@Mock lateinit var loopPlugin: LoopPlugin
|
||||
@Mock lateinit var virtualPumpPlugin: VirtualPumpPlugin
|
||||
@Mock lateinit var localProfilePlugin: LocalProfilePlugin
|
||||
|
|
|
@ -3,7 +3,7 @@ package info.nightscout.androidaps.plugins.pump.virtual
|
|||
import dagger.android.AndroidInjector
|
||||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.TestBase
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.IobCobCalculator
|
||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||
import info.nightscout.androidaps.interfaces.PumpSync
|
||||
|
@ -28,7 +28,7 @@ class VirtualPumpPluginUTest : TestBase() {
|
|||
@Mock lateinit var sp: SP
|
||||
@Mock lateinit var profileFunction: ProfileFunction
|
||||
@Mock lateinit var iobCobCalculator: IobCobCalculator
|
||||
@Mock lateinit var commandQueue: CommandQueueProvider
|
||||
@Mock lateinit var commandQueue: CommandQueue
|
||||
@Mock lateinit var dateUtil: DateUtil
|
||||
@Mock lateinit var pumpSync: PumpSync
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ import org.mockito.Mockito.`when`
|
|||
import org.mockito.Mockito.anyLong
|
||||
import java.util.*
|
||||
|
||||
class CommandQueueTest : TestBaseWithProfile() {
|
||||
class CommandQueueImplementationTest : TestBaseWithProfile() {
|
||||
|
||||
@Mock lateinit var constraintChecker: ConstraintChecker
|
||||
@Mock lateinit var activePlugin: ActivePlugin
|
||||
|
@ -64,7 +64,7 @@ class CommandQueueTest : TestBaseWithProfile() {
|
|||
repository: AppRepository,
|
||||
fabricPrivacy: FabricPrivacy,
|
||||
config: Config
|
||||
) : CommandQueue(injector, aapsLogger, rxBus, aapsSchedulers, rh, constraintChecker, profileFunction,
|
||||
) : CommandQueueImplementation(injector, aapsLogger, rxBus, aapsSchedulers, rh, constraintChecker, profileFunction,
|
||||
activePlugin, context, sp, buildHelper, dateUtil, repository, fabricPrivacy, config) {
|
||||
|
||||
override fun notifyAboutNewCommand() {}
|
||||
|
@ -99,7 +99,7 @@ class CommandQueueTest : TestBaseWithProfile() {
|
|||
}
|
||||
}
|
||||
|
||||
private lateinit var commandQueue: CommandQueue
|
||||
private lateinit var commandQueue: CommandQueueImplementation
|
||||
private lateinit var testPumpPlugin: TestPumpPlugin
|
||||
|
||||
@Before
|
||||
|
@ -138,7 +138,7 @@ class CommandQueueTest : TestBaseWithProfile() {
|
|||
|
||||
@Test
|
||||
fun commandIsPickedUp() {
|
||||
val commandQueue = CommandQueue(injector, aapsLogger, rxBus, aapsSchedulers, rh,
|
||||
val commandQueue = CommandQueueImplementation(injector, aapsLogger, rxBus, aapsSchedulers, rh,
|
||||
constraintChecker, profileFunction, activePlugin, context, sp,
|
||||
BuildHelperImpl(ConfigImpl(), fileListProvider), dateUtil, repository,
|
||||
fabricPrivacy, config)
|
|
@ -46,13 +46,13 @@ class QueueThreadTest : TestBaseWithProfile() {
|
|||
}
|
||||
|
||||
private lateinit var pumpPlugin: TestPumpPlugin
|
||||
private lateinit var commandQueue: CommandQueue
|
||||
private lateinit var commandQueue: CommandQueueImplementation
|
||||
private lateinit var sut: QueueThread
|
||||
|
||||
@Before
|
||||
fun prepare() {
|
||||
pumpPlugin = TestPumpPlugin(injector)
|
||||
commandQueue = CommandQueue(
|
||||
commandQueue = CommandQueueImplementation(
|
||||
injector, aapsLogger, rxBus, aapsSchedulers, rh, constraintChecker,
|
||||
profileFunction, activePlugin, context, sp,
|
||||
BuildHelperImpl(ConfigImpl(), fileListProvider), dateUtil, repository, fabricPrivacy, config
|
||||
|
|
|
@ -31,7 +31,7 @@ class BolusWizardTest : TestBase() {
|
|||
@Mock lateinit var constraintChecker: ConstraintChecker
|
||||
@Mock lateinit var context: Context
|
||||
@Mock lateinit var activePlugin: ActivePlugin
|
||||
@Mock lateinit var commandQueue: CommandQueueProvider
|
||||
@Mock lateinit var commandQueue: CommandQueue
|
||||
@Mock lateinit var loopPlugin: LoopPlugin
|
||||
@Mock lateinit var iobCobCalculator: IobCobCalculator
|
||||
@Mock lateinit var virtualPumpPlugin: VirtualPumpPlugin
|
||||
|
|
|
@ -7,7 +7,7 @@ import info.nightscout.androidaps.data.PumpEnactResult
|
|||
import info.nightscout.androidaps.database.entities.UserEntry
|
||||
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||
import info.nightscout.androidaps.events.EventRefreshOverview
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.ConfigBuilder
|
||||
import info.nightscout.androidaps.interfaces.Loop
|
||||
import info.nightscout.androidaps.interfaces.PluginBase
|
||||
|
@ -21,7 +21,7 @@ class ActionLoopDisable(injector: HasAndroidInjector) : Action(injector) {
|
|||
|
||||
@Inject lateinit var loopPlugin: Loop
|
||||
@Inject lateinit var configBuilder: ConfigBuilder
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var rxBus: RxBus
|
||||
@Inject lateinit var uel: UserEntryLogger
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ open class ActionsTestBase : TestBaseWithProfile() {
|
|||
}
|
||||
|
||||
@Mock lateinit var sp: SP
|
||||
@Mock lateinit var commandQueue: CommandQueueProvider
|
||||
@Mock lateinit var commandQueue: CommandQueue
|
||||
@Mock lateinit var configBuilder: ConfigBuilder
|
||||
@Mock lateinit var activePlugin: ActivePlugin
|
||||
@Mock lateinit var profilePlugin: ProfileSource
|
||||
|
|
|
@ -17,7 +17,7 @@ import javax.inject.Inject;
|
|||
|
||||
import dagger.android.support.DaggerFragment;
|
||||
import info.nightscout.androidaps.combo.R;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue;
|
||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||
import info.nightscout.androidaps.plugins.pump.combo.events.EventComboPumpUpdateGUI;
|
||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState;
|
||||
|
@ -33,7 +33,7 @@ import io.reactivex.disposables.CompositeDisposable;
|
|||
|
||||
public class ComboFragment extends DaggerFragment {
|
||||
@Inject ComboPlugin comboPlugin;
|
||||
@Inject CommandQueueProvider commandQueue;
|
||||
@Inject CommandQueue commandQueue;
|
||||
@Inject ResourceHelper rh;
|
||||
@Inject RxBus rxBus;
|
||||
@Inject SP sp;
|
||||
|
|
|
@ -27,7 +27,7 @@ import info.nightscout.androidaps.data.PumpEnactResult;
|
|||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||
import info.nightscout.androidaps.events.EventRefreshOverview;
|
||||
import info.nightscout.androidaps.extensions.PumpStateExtensionKt;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue;
|
||||
import info.nightscout.androidaps.interfaces.Constraint;
|
||||
import info.nightscout.androidaps.interfaces.Constraints;
|
||||
import info.nightscout.androidaps.interfaces.PluginDescription;
|
||||
|
@ -94,7 +94,7 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
|||
private final ProfileFunction profileFunction;
|
||||
private final SP sp;
|
||||
private RxBus rxBus;
|
||||
private final CommandQueueProvider commandQueue;
|
||||
private final CommandQueue commandQueue;
|
||||
private final Context context;
|
||||
private final PumpSync pumpSync;
|
||||
private final DateUtil dateUtil;
|
||||
|
@ -150,7 +150,7 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
|||
ResourceHelper rh,
|
||||
ProfileFunction profileFunction,
|
||||
SP sp,
|
||||
CommandQueueProvider commandQueue,
|
||||
CommandQueue commandQueue,
|
||||
Context context,
|
||||
PumpSync pumpSync,
|
||||
DateUtil dateUtil
|
||||
|
|
|
@ -23,7 +23,7 @@ class ComboPluginTest : TestBase() {
|
|||
@Mock lateinit var rh: ResourceHelper
|
||||
@Mock lateinit var profileFunction: ProfileFunction
|
||||
@Mock lateinit var activePlugin: ActivePlugin
|
||||
@Mock lateinit var commandQueue: CommandQueueProvider
|
||||
@Mock lateinit var commandQueue: CommandQueue
|
||||
@Mock lateinit var pumpSync: PumpSync
|
||||
@Mock lateinit var sp: SP
|
||||
@Mock lateinit var context: Context
|
||||
|
|
|
@ -23,7 +23,7 @@ import info.nightscout.androidaps.events.EventDanaRSyncStatus
|
|||
import info.nightscout.androidaps.events.EventPumpStatusChanged
|
||||
import info.nightscout.androidaps.extensions.total
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||
|
@ -50,7 +50,7 @@ class TDDStatsActivity : NoSplashAppCompatActivity() {
|
|||
@Inject lateinit var sp: SP
|
||||
@Inject lateinit var profileFunction: ProfileFunction
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var repository: AppRepository
|
||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
||||
|
|
|
@ -14,7 +14,7 @@ import info.nightscout.androidaps.core.databinding.DialogBolusprogressBinding
|
|||
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||
import info.nightscout.androidaps.events.EventPumpStatusChanged
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.logging.LTag
|
||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||
|
@ -32,7 +32,7 @@ class BolusProgressDialog : DaggerDialogFragment() {
|
|||
@Inject lateinit var aapsLogger: AAPSLogger
|
||||
@Inject lateinit var rxBus: RxBus
|
||||
@Inject lateinit var rh: ResourceHelper
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
||||
@Inject lateinit var uel: UserEntryLogger
|
||||
|
|
|
@ -7,7 +7,7 @@ import info.nightscout.androidaps.queue.commands.CustomCommand
|
|||
import info.nightscout.androidaps.queue.Callback
|
||||
import info.nightscout.androidaps.queue.commands.Command
|
||||
|
||||
interface CommandQueueProvider {
|
||||
interface CommandQueue {
|
||||
|
||||
fun isRunning(type: Command.CommandType): Boolean
|
||||
fun pickup()
|
|
@ -254,7 +254,7 @@ interface Pump {
|
|||
|
||||
/**
|
||||
* Executes a custom queued command
|
||||
* See [CommandQueueProvider.customCommand] for queuing a custom command.
|
||||
* See [CommandQueue.customCommand] for queuing a custom command.
|
||||
*
|
||||
* @param customCommand the custom command to be executed
|
||||
* @return PumpEnactResult that represents the command execution result
|
||||
|
|
|
@ -10,7 +10,7 @@ abstract class PumpPluginBase(
|
|||
injector: HasAndroidInjector,
|
||||
aapsLogger: AAPSLogger,
|
||||
rh: ResourceHelper,
|
||||
val commandQueue: CommandQueueProvider
|
||||
val commandQueue: CommandQueue
|
||||
) : PluginBase(pluginDescription, aapsLogger, rh, injector) {
|
||||
|
||||
override fun onStart() {
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.io.Serializable
|
|||
|
||||
/**
|
||||
* Implement this interface for every custom pump command that you want to be able to queue
|
||||
* See [info.nightscout.androidaps.interfaces.CommandQueueProvider.customCommand] for queuing a custom command.
|
||||
* See [info.nightscout.androidaps.interfaces.CommandQueue.customCommand] for queuing a custom command.
|
||||
*/
|
||||
interface CustomCommand : Serializable {
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ import info.nightscout.androidaps.events.EventInitializationChanged
|
|||
import info.nightscout.androidaps.events.EventPumpStatusChanged
|
||||
import info.nightscout.androidaps.events.EventTempBasalChange
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.Pump
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.logging.LTag
|
||||
|
@ -50,7 +50,7 @@ class DanaFragment : DaggerFragment() {
|
|||
@Inject lateinit var rxBus: RxBus
|
||||
@Inject lateinit var aapsLogger: AAPSLogger
|
||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var danaPump: DanaPump
|
||||
@Inject lateinit var rh: ResourceHelper
|
||||
|
|
|
@ -19,7 +19,7 @@ import info.nightscout.androidaps.dana.databinding.DanarHistoryItemBinding
|
|||
import info.nightscout.androidaps.events.EventDanaRSyncStatus
|
||||
import info.nightscout.androidaps.events.EventPumpStatusChanged
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.Profile
|
||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
|
@ -44,7 +44,7 @@ class DanaHistoryActivity : NoSplashAppCompatActivity() {
|
|||
@Inject lateinit var profileFunction: ProfileFunction
|
||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var danaHistoryRecordDao: DanaHistoryRecordDao
|
||||
@Inject lateinit var dateUtil: DateUtil
|
||||
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
||||
|
|
|
@ -10,7 +10,7 @@ import info.nightscout.androidaps.dana.R
|
|||
import info.nightscout.androidaps.dana.databinding.DanarUserOptionsActivityBinding
|
||||
import info.nightscout.androidaps.events.EventInitializationChanged
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.logging.LTag
|
||||
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||
|
@ -33,7 +33,7 @@ class DanaUserOptionsActivity : NoSplashAppCompatActivity() {
|
|||
@Inject lateinit var context: Context
|
||||
@Inject lateinit var danaPump: DanaPump
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
||||
|
||||
private val disposable = CompositeDisposable()
|
||||
|
|
|
@ -45,7 +45,7 @@ class DanaRKoreanPlugin @Inject constructor(
|
|||
constraintChecker: ConstraintChecker,
|
||||
activePlugin: ActivePlugin,
|
||||
sp: SP,
|
||||
commandQueue: CommandQueueProvider,
|
||||
commandQueue: CommandQueue,
|
||||
danaPump: DanaPump,
|
||||
dateUtil: DateUtil,
|
||||
private val fabricPrivacy: FabricPrivacy,
|
||||
|
|
|
@ -43,7 +43,7 @@ import info.nightscout.androidaps.events.EventInitializationChanged;
|
|||
import info.nightscout.androidaps.events.EventProfileSwitchChanged;
|
||||
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue;
|
||||
import info.nightscout.androidaps.interfaces.ProfileFunction;
|
||||
import info.nightscout.androidaps.interfaces.PumpSync;
|
||||
import info.nightscout.androidaps.logging.AAPSLogger;
|
||||
|
@ -67,7 +67,7 @@ public class DanaRKoreanExecutionService extends AbstractDanaRExecutionService {
|
|||
@Inject DanaPump danaPump;
|
||||
@Inject DanaRPlugin danaRPlugin;
|
||||
@Inject DanaRKoreanPlugin danaRKoreanPlugin;
|
||||
@Inject CommandQueueProvider commandQueue;
|
||||
@Inject CommandQueue commandQueue;
|
||||
@Inject MessageHashTableRKorean messageHashTableRKorean;
|
||||
@Inject ActivePlugin activePlugin;
|
||||
@Inject ProfileFunction profileFunction;
|
||||
|
|
|
@ -21,7 +21,7 @@ import info.nightscout.androidaps.interfaces.Profile;
|
|||
import info.nightscout.androidaps.data.PumpEnactResult;
|
||||
import info.nightscout.androidaps.events.EventAppExit;
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue;
|
||||
import info.nightscout.androidaps.interfaces.Constraint;
|
||||
import info.nightscout.androidaps.interfaces.PumpSync;
|
||||
import info.nightscout.androidaps.logging.AAPSLogger;
|
||||
|
@ -66,7 +66,7 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin {
|
|||
ConstraintChecker constraintChecker,
|
||||
ActivePlugin activePlugin,
|
||||
SP sp,
|
||||
CommandQueueProvider commandQueue,
|
||||
CommandQueue commandQueue,
|
||||
DanaPump danaPump,
|
||||
DetailedBolusInfoStorage detailedBolusInfoStorage,
|
||||
TemporaryBasalStorage temporaryBasalStorage,
|
||||
|
|
|
@ -56,7 +56,7 @@ import info.nightscout.androidaps.events.EventInitializationChanged;
|
|||
import info.nightscout.androidaps.events.EventProfileSwitchChanged;
|
||||
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue;
|
||||
import info.nightscout.androidaps.interfaces.ProfileFunction;
|
||||
import info.nightscout.androidaps.interfaces.Pump;
|
||||
import info.nightscout.androidaps.interfaces.PumpSync;
|
||||
|
@ -83,7 +83,7 @@ public class DanaRv2ExecutionService extends AbstractDanaRExecutionService {
|
|||
@Inject DanaRKoreanPlugin danaRKoreanPlugin;
|
||||
@Inject DanaRv2Plugin danaRv2Plugin;
|
||||
@Inject ActivePlugin activePlugin;
|
||||
@Inject CommandQueueProvider commandQueue;
|
||||
@Inject CommandQueue commandQueue;
|
||||
@Inject Context context;
|
||||
@Inject MessageHashTableRv2 messageHashTableRv2;
|
||||
@Inject ProfileFunction profileFunction;
|
||||
|
|
|
@ -16,7 +16,7 @@ import info.nightscout.androidaps.events.EventConfigBuilderChange;
|
|||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||
import info.nightscout.androidaps.extensions.PumpStateExtensionKt;
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue;
|
||||
import info.nightscout.androidaps.interfaces.Constraint;
|
||||
import info.nightscout.androidaps.interfaces.Constraints;
|
||||
import info.nightscout.androidaps.interfaces.Dana;
|
||||
|
@ -70,7 +70,7 @@ public abstract class AbstractDanaRPlugin extends PumpPluginBase implements Pump
|
|||
ConstraintChecker constraintChecker,
|
||||
AAPSLogger aapsLogger,
|
||||
AapsSchedulers aapsSchedulers,
|
||||
CommandQueueProvider commandQueue,
|
||||
CommandQueue commandQueue,
|
||||
RxBus rxBus,
|
||||
ActivePlugin activePlugin,
|
||||
SP sp,
|
||||
|
|
|
@ -19,7 +19,7 @@ import info.nightscout.androidaps.data.PumpEnactResult;
|
|||
import info.nightscout.androidaps.events.EventAppExit;
|
||||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue;
|
||||
import info.nightscout.androidaps.interfaces.Constraint;
|
||||
import info.nightscout.androidaps.interfaces.PluginType;
|
||||
import info.nightscout.androidaps.interfaces.Profile;
|
||||
|
@ -59,7 +59,7 @@ public class DanaRPlugin extends AbstractDanaRPlugin {
|
|||
ConstraintChecker constraintChecker,
|
||||
ActivePlugin activePlugin,
|
||||
SP sp,
|
||||
CommandQueueProvider commandQueue,
|
||||
CommandQueue commandQueue,
|
||||
DanaPump danaPump,
|
||||
DateUtil dateUtil,
|
||||
FabricPrivacy fabricPrivacy,
|
||||
|
|
|
@ -19,7 +19,7 @@ import info.nightscout.androidaps.danaRKorean.DanaRKoreanPlugin;
|
|||
import info.nightscout.androidaps.danaRv2.DanaRv2Plugin;
|
||||
import info.nightscout.androidaps.danar.DanaRPlugin;
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue;
|
||||
import info.nightscout.androidaps.interfaces.ConfigBuilder;
|
||||
import info.nightscout.androidaps.interfaces.PumpSync;
|
||||
import info.nightscout.androidaps.logging.AAPSLogger;
|
||||
|
@ -49,7 +49,7 @@ public class MessageBase {
|
|||
@Inject public ResourceHelper rh;
|
||||
@Inject public ActivePlugin activePlugin;
|
||||
@Inject public ConfigBuilder configBuilder;
|
||||
@Inject public CommandQueueProvider commandQueue;
|
||||
@Inject public CommandQueue commandQueue;
|
||||
@Inject public DetailedBolusInfoStorage detailedBolusInfoStorage;
|
||||
@Inject public TemporaryBasalStorage temporaryBasalStorage;
|
||||
@Inject public ConstraintChecker constraintChecker;
|
||||
|
|
|
@ -49,7 +49,7 @@ import info.nightscout.androidaps.dialogs.BolusProgressDialog;
|
|||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||
import info.nightscout.androidaps.events.EventProfileSwitchChanged;
|
||||
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue;
|
||||
import info.nightscout.androidaps.interfaces.ProfileFunction;
|
||||
import info.nightscout.androidaps.interfaces.PumpSync;
|
||||
import info.nightscout.androidaps.logging.AAPSLogger;
|
||||
|
@ -71,7 +71,7 @@ public class DanaRExecutionService extends AbstractDanaRExecutionService {
|
|||
@Inject DanaPump danaPump;
|
||||
@Inject DanaRPlugin danaRPlugin;
|
||||
@Inject DanaRKoreanPlugin danaRKoreanPlugin;
|
||||
@Inject CommandQueueProvider commandQueue;
|
||||
@Inject CommandQueue commandQueue;
|
||||
@Inject MessageHashTableR messageHashTableR;
|
||||
@Inject ProfileFunction profileFunction;
|
||||
@Inject PumpSync pumpSync;
|
||||
|
|
|
@ -8,7 +8,7 @@ import info.nightscout.androidaps.TestBaseWithProfile
|
|||
import info.nightscout.androidaps.dana.DanaPump
|
||||
import info.nightscout.androidaps.danar.DanaRPlugin
|
||||
import info.nightscout.androidaps.danar.R
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.Constraint
|
||||
import info.nightscout.androidaps.interfaces.PluginType
|
||||
import info.nightscout.androidaps.interfaces.PumpSync
|
||||
|
@ -25,7 +25,7 @@ class DanaRPluginTest : TestBaseWithProfile() {
|
|||
@Mock lateinit var context: Context
|
||||
@Mock lateinit var constraintChecker: ConstraintChecker
|
||||
@Mock lateinit var sp: SP
|
||||
@Mock lateinit var commandQueue: CommandQueueProvider
|
||||
@Mock lateinit var commandQueue: CommandQueue
|
||||
@Mock lateinit var pumpSync: PumpSync
|
||||
|
||||
lateinit var danaPump: DanaPump
|
||||
|
|
|
@ -11,7 +11,7 @@ import info.nightscout.androidaps.danaRv2.DanaRv2Plugin
|
|||
import info.nightscout.androidaps.danar.DanaRPlugin
|
||||
import info.nightscout.androidaps.danar.comm.MessageBase
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.ConfigBuilder
|
||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||
import info.nightscout.androidaps.interfaces.PumpSync
|
||||
|
@ -39,7 +39,7 @@ open class DanaRTestBase : TestBase() {
|
|||
@Mock lateinit var danaRv2Plugin: DanaRv2Plugin
|
||||
@Mock lateinit var rh: ResourceHelper
|
||||
@Mock lateinit var configBuilder: ConfigBuilder
|
||||
@Mock lateinit var commandQueue: CommandQueueProvider
|
||||
@Mock lateinit var commandQueue: CommandQueue
|
||||
@Mock lateinit var detailedBolusInfoStorage: DetailedBolusInfoStorage
|
||||
@Mock lateinit var constraintChecker: ConstraintChecker
|
||||
@Mock lateinit var pumpSync: PumpSync
|
||||
|
|
|
@ -8,7 +8,7 @@ import info.nightscout.androidaps.TestBaseWithProfile
|
|||
import info.nightscout.androidaps.dana.DanaPump
|
||||
import info.nightscout.androidaps.danaRKorean.DanaRKoreanPlugin
|
||||
import info.nightscout.androidaps.danar.R
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.Constraint
|
||||
import info.nightscout.androidaps.interfaces.PluginType
|
||||
import info.nightscout.androidaps.interfaces.PumpSync
|
||||
|
@ -25,7 +25,7 @@ class DanaRKoreanPluginTest : TestBaseWithProfile() {
|
|||
@Mock lateinit var context: Context
|
||||
@Mock lateinit var constraintChecker: ConstraintChecker
|
||||
@Mock lateinit var sp: SP
|
||||
@Mock lateinit var commandQueue: CommandQueueProvider
|
||||
@Mock lateinit var commandQueue: CommandQueue
|
||||
@Mock lateinit var pumpSync: PumpSync
|
||||
|
||||
lateinit var danaPump: DanaPump
|
||||
|
|
|
@ -8,7 +8,7 @@ import info.nightscout.androidaps.TestBaseWithProfile
|
|||
import info.nightscout.androidaps.dana.DanaPump
|
||||
import info.nightscout.androidaps.danaRv2.DanaRv2Plugin
|
||||
import info.nightscout.androidaps.danar.R
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.Constraint
|
||||
import info.nightscout.androidaps.interfaces.PluginType
|
||||
import info.nightscout.androidaps.interfaces.PumpSync
|
||||
|
@ -26,7 +26,7 @@ class DanaRv2PluginTest : TestBaseWithProfile() {
|
|||
@Mock lateinit var context: Context
|
||||
@Mock lateinit var constraintChecker: ConstraintChecker
|
||||
@Mock lateinit var sp: SP
|
||||
@Mock lateinit var commandQueue: CommandQueueProvider
|
||||
@Mock lateinit var commandQueue: CommandQueue
|
||||
@Mock lateinit var detailedBolusInfoStorage: DetailedBolusInfoStorage
|
||||
@Mock lateinit var temporaryBasalStorage: TemporaryBasalStorage
|
||||
@Mock lateinit var pumpSync: PumpSync
|
||||
|
|
|
@ -57,7 +57,7 @@ class DanaRSPlugin @Inject constructor(
|
|||
private val constraintChecker: ConstraintChecker,
|
||||
private val profileFunction: ProfileFunction,
|
||||
private val sp: SP,
|
||||
commandQueue: CommandQueueProvider,
|
||||
commandQueue: CommandQueue,
|
||||
private val danaPump: DanaPump,
|
||||
private val pumpSync: PumpSync,
|
||||
private val detailedBolusInfoStorage: DetailedBolusInfoStorage,
|
||||
|
|
|
@ -23,7 +23,7 @@ import info.nightscout.androidaps.events.EventInitializationChanged
|
|||
import info.nightscout.androidaps.events.EventProfileSwitchChanged
|
||||
import info.nightscout.androidaps.events.EventPumpStatusChanged
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.Profile
|
||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||
import info.nightscout.androidaps.interfaces.PumpSync
|
||||
|
@ -61,7 +61,7 @@ class DanaRSService : DaggerService() {
|
|||
@Inject lateinit var sp: SP
|
||||
@Inject lateinit var rh: ResourceHelper
|
||||
@Inject lateinit var profileFunction: ProfileFunction
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var context: Context
|
||||
@Inject lateinit var danaRSPlugin: DanaRSPlugin
|
||||
@Inject lateinit var danaPump: DanaPump
|
||||
|
|
|
@ -3,7 +3,7 @@ package info.nightscout.androidaps.danars
|
|||
import android.content.Context
|
||||
import dagger.android.AndroidInjector
|
||||
import info.nightscout.androidaps.Constants
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.Constraint
|
||||
import info.nightscout.androidaps.interfaces.PluginType
|
||||
import info.nightscout.androidaps.interfaces.PumpSync
|
||||
|
@ -22,7 +22,7 @@ class DanaRSPluginTest : DanaRSTestBase() {
|
|||
|
||||
@Mock lateinit var context: Context
|
||||
@Mock lateinit var constraintChecker: ConstraintChecker
|
||||
@Mock lateinit var commandQueue: CommandQueueProvider
|
||||
@Mock lateinit var commandQueue: CommandQueue
|
||||
@Mock lateinit var detailedBolusInfoStorage: DetailedBolusInfoStorage
|
||||
@Mock lateinit var temporaryBasalStorage: TemporaryBasalStorage
|
||||
@Mock lateinit var pumpSync: PumpSync
|
||||
|
|
|
@ -5,7 +5,7 @@ import dagger.android.AndroidInjector
|
|||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.danars.DanaRSPlugin
|
||||
import info.nightscout.androidaps.danars.DanaRSTestBase
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.Constraint
|
||||
import info.nightscout.androidaps.interfaces.PumpSync
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
|
||||
|
@ -20,7 +20,7 @@ import org.mockito.Mockito
|
|||
class DanaRsPacketBolusSetStepBolusStartTest : DanaRSTestBase() {
|
||||
|
||||
@Mock lateinit var constraintChecker: ConstraintChecker
|
||||
@Mock lateinit var commandQueue: CommandQueueProvider
|
||||
@Mock lateinit var commandQueue: CommandQueue
|
||||
@Mock lateinit var context: Context
|
||||
@Mock lateinit var detailedBolusInfoStorage: DetailedBolusInfoStorage
|
||||
@Mock lateinit var temporaryBasalStorage: TemporaryBasalStorage
|
||||
|
|
|
@ -6,7 +6,7 @@ import dagger.android.HasAndroidInjector
|
|||
import info.nightscout.androidaps.danars.DanaRSPlugin
|
||||
import info.nightscout.androidaps.danars.DanaRSTestBase
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.PumpSync
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
|
||||
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress
|
||||
|
@ -23,7 +23,7 @@ class DanaRsPacketNotifyDeliveryRateDisplayTest : DanaRSTestBase() {
|
|||
|
||||
@Mock lateinit var activePlugin: ActivePlugin
|
||||
@Mock lateinit var constraintChecker: ConstraintChecker
|
||||
@Mock lateinit var commandQueue: CommandQueueProvider
|
||||
@Mock lateinit var commandQueue: CommandQueue
|
||||
@Mock lateinit var context: Context
|
||||
@Mock lateinit var detailedBolusInfoStorage: DetailedBolusInfoStorage
|
||||
@Mock lateinit var temporaryBasalStorage: TemporaryBasalStorage
|
||||
|
|
|
@ -19,7 +19,7 @@ import info.nightscout.androidaps.events.EventInitializationChanged
|
|||
import info.nightscout.androidaps.events.EventPumpStatusChanged
|
||||
import info.nightscout.androidaps.events.EventTempBasalChange
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.Pump
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.logging.LTag
|
||||
|
@ -41,7 +41,7 @@ class DiaconnG8Fragment : DaggerFragment() {
|
|||
@Inject lateinit var rxBus: RxBus
|
||||
@Inject lateinit var aapsLogger: AAPSLogger
|
||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var diaconnG8Pump: DiaconnG8Pump
|
||||
@Inject lateinit var rh: ResourceHelper
|
||||
|
|
|
@ -54,7 +54,7 @@ class DiaconnG8Plugin @Inject constructor(
|
|||
private val constraintChecker: ConstraintChecker,
|
||||
private val profileFunction: ProfileFunction,
|
||||
private val sp: SP,
|
||||
commandQueue: CommandQueueProvider,
|
||||
commandQueue: CommandQueue,
|
||||
private val diaconnG8Pump: DiaconnG8Pump,
|
||||
private val pumpSync: PumpSync,
|
||||
private val detailedBolusInfoStorage: DetailedBolusInfoStorage,
|
||||
|
|
|
@ -17,7 +17,7 @@ import info.nightscout.androidaps.diaconn.database.DiaconnHistoryRecordDao
|
|||
import info.nightscout.androidaps.diaconn.databinding.DiaconnG8HistoryActivityBinding
|
||||
import info.nightscout.androidaps.events.EventPumpStatusChanged
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||
|
@ -41,7 +41,7 @@ class DiaconnG8HistoryActivity : NoSplashAppCompatActivity() {
|
|||
@Inject lateinit var profileFunction: ProfileFunction
|
||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var diaconnHistoryRecordDao: DiaconnHistoryRecordDao
|
||||
@Inject lateinit var dateUtil: DateUtil
|
||||
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
||||
|
|
|
@ -15,7 +15,7 @@ import info.nightscout.androidaps.diaconn.R
|
|||
import info.nightscout.androidaps.diaconn.databinding.DiaconnG8UserOptionsActivityBinding
|
||||
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.logging.LTag
|
||||
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||
|
@ -35,7 +35,7 @@ class DiaconnG8UserOptionsActivity : NoSplashAppCompatActivity() {
|
|||
@Inject lateinit var context: Context
|
||||
@Inject lateinit var diaconnG8Pump: DiaconnG8Pump
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var sp: SP
|
||||
|
||||
private val disposable = CompositeDisposable()
|
||||
|
|
|
@ -23,7 +23,7 @@ import info.nightscout.androidaps.events.EventInitializationChanged
|
|||
import info.nightscout.androidaps.events.EventProfileSwitchChanged
|
||||
import info.nightscout.androidaps.events.EventPumpStatusChanged
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.Profile
|
||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||
import info.nightscout.androidaps.interfaces.PumpSync
|
||||
|
@ -60,7 +60,7 @@ class DiaconnG8Service : DaggerService() {
|
|||
@Inject lateinit var sp: SP
|
||||
@Inject lateinit var rh: ResourceHelper
|
||||
@Inject lateinit var profileFunction: ProfileFunction
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var context: Context
|
||||
@Inject lateinit var diaconnG8Plugin : DiaconnG8Plugin
|
||||
@Inject lateinit var diaconnG8Pump: DiaconnG8Pump
|
||||
|
|
|
@ -21,7 +21,7 @@ import javax.inject.Inject;
|
|||
|
||||
import dagger.android.support.DaggerFragment;
|
||||
import info.nightscout.androidaps.insight.R;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue;
|
||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||
import info.nightscout.androidaps.plugins.pump.insight.app_layer.parameter_blocks.TBROverNotificationBlock;
|
||||
import info.nightscout.androidaps.plugins.pump.insight.descriptors.ActiveBasalRate;
|
||||
|
@ -41,7 +41,7 @@ import io.reactivex.disposables.CompositeDisposable;
|
|||
|
||||
public class LocalInsightFragment extends DaggerFragment implements View.OnClickListener {
|
||||
@Inject LocalInsightPlugin localInsightPlugin;
|
||||
@Inject CommandQueueProvider commandQueue;
|
||||
@Inject CommandQueue commandQueue;
|
||||
@Inject RxBus rxBus;
|
||||
@Inject ResourceHelper rh;
|
||||
@Inject FabricPrivacy fabricPrivacy;
|
||||
|
|
|
@ -41,7 +41,7 @@ import info.nightscout.androidaps.insight.database.InsightHistoryOffset;
|
|||
import info.nightscout.androidaps.insight.database.InsightPumpID;
|
||||
import info.nightscout.androidaps.insight.database.InsightPumpID.EventType;
|
||||
import info.nightscout.androidaps.insight.R;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue;
|
||||
import info.nightscout.androidaps.interfaces.Config;
|
||||
import info.nightscout.androidaps.interfaces.Constraint;
|
||||
import info.nightscout.androidaps.interfaces.Constraints;
|
||||
|
@ -140,7 +140,7 @@ public class LocalInsightPlugin extends PumpPluginBase implements Pump, Constrai
|
|||
private final RxBus rxBus;
|
||||
private final ResourceHelper rh;
|
||||
private final SP sp;
|
||||
private final CommandQueueProvider commandQueue;
|
||||
private final CommandQueue commandQueue;
|
||||
private final ProfileFunction profileFunction;
|
||||
private final Context context;
|
||||
private final DateUtil dateUtil;
|
||||
|
@ -200,7 +200,7 @@ public class LocalInsightPlugin extends PumpPluginBase implements Pump, Constrai
|
|||
RxBus rxBus,
|
||||
ResourceHelper rh,
|
||||
SP sp,
|
||||
CommandQueueProvider commandQueue,
|
||||
CommandQueue commandQueue,
|
||||
ProfileFunction profileFunction,
|
||||
Context context,
|
||||
Config config,
|
||||
|
|
|
@ -14,7 +14,7 @@ import info.nightscout.androidaps.events.EventExtendedBolusChange
|
|||
import info.nightscout.androidaps.events.EventPumpStatusChanged
|
||||
import info.nightscout.androidaps.events.EventTempBasalChange
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.PumpSync
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.logging.LTag
|
||||
|
@ -55,7 +55,7 @@ class MedtronicFragment : DaggerFragment() {
|
|||
@Inject lateinit var rh: ResourceHelper
|
||||
@Inject lateinit var dateUtil: DateUtil
|
||||
@Inject lateinit var rxBus: RxBus
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var medtronicPumpPlugin: MedtronicPumpPlugin
|
||||
@Inject lateinit var warnColors: WarnColors
|
||||
|
|
|
@ -75,7 +75,7 @@ class MedtronicPumpPlugin @Inject constructor(
|
|||
rh: ResourceHelper,
|
||||
activePlugin: ActivePlugin,
|
||||
sp: SP,
|
||||
commandQueue: CommandQueueProvider,
|
||||
commandQueue: CommandQueue,
|
||||
fabricPrivacy: FabricPrivacy,
|
||||
private val medtronicUtil: MedtronicUtil,
|
||||
private val medtronicPumpStatus: MedtronicPumpStatus,
|
||||
|
|
|
@ -86,7 +86,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
injector: HasAndroidInjector,
|
||||
aapsLogger: AAPSLogger,
|
||||
rh: ResourceHelper,
|
||||
commandQueue: CommandQueueProvider
|
||||
commandQueue: CommandQueue
|
||||
) : PumpPluginBase(pluginDescription, injector, aapsLogger, rh, commandQueue), Pump {
|
||||
@Volatile var bolusCanceled = false
|
||||
@Volatile var bolusDeliveryInProgress = false
|
||||
|
|
|
@ -7,7 +7,7 @@ import dagger.android.HasAndroidInjector
|
|||
import info.nightscout.androidaps.activities.ErrorHelperActivity
|
||||
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
|
||||
import info.nightscout.androidaps.extensions.toVisibility
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandPlayTestBeep
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.PodActivationWizardActivity
|
||||
|
@ -30,7 +30,7 @@ class DashPodManagementActivity : NoSplashAppCompatActivity() {
|
|||
|
||||
@Inject lateinit var rxBus: RxBus
|
||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var injector: HasAndroidInjector
|
||||
@Inject lateinit var context: Context
|
||||
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
||||
|
|
|
@ -14,7 +14,7 @@ import info.nightscout.androidaps.Constants
|
|||
import info.nightscout.androidaps.activities.ErrorHelperActivity
|
||||
import info.nightscout.androidaps.events.EventPreferenceChange
|
||||
import info.nightscout.androidaps.events.EventPumpStatusChanged
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.PumpSync
|
||||
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification
|
||||
|
@ -59,7 +59,7 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
|
|||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||
@Inject lateinit var rh: ResourceHelper
|
||||
@Inject lateinit var rxBus: RxBus
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var omnipodDashPumpPlugin: OmnipodDashPumpPlugin
|
||||
@Inject lateinit var podStateManager: OmnipodDashPodStateManager
|
||||
@Inject lateinit var sp: SP
|
||||
|
|
|
@ -3,7 +3,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.deactivat
|
|||
import androidx.annotation.StringRes
|
||||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.data.PumpEnactResult
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification
|
||||
|
@ -19,7 +19,7 @@ import javax.inject.Inject
|
|||
|
||||
class DashDeactivatePodViewModel @Inject constructor(
|
||||
private val podStateManager: OmnipodDashPodStateManager,
|
||||
private val commandQueueProvider: CommandQueueProvider,
|
||||
private val commandQueue: CommandQueue,
|
||||
private val rxBus: RxBus,
|
||||
injector: HasAndroidInjector,
|
||||
logger: AAPSLogger,
|
||||
|
@ -27,7 +27,7 @@ class DashDeactivatePodViewModel @Inject constructor(
|
|||
) : DeactivatePodViewModel(injector, logger, aapsSchedulers) {
|
||||
|
||||
override fun doExecuteAction(): Single<PumpEnactResult> = Single.create { source ->
|
||||
commandQueueProvider.customCommand(
|
||||
commandQueue.customCommand(
|
||||
CommandDeactivatePod(),
|
||||
object : Callback() {
|
||||
override fun run() {
|
||||
|
|
|
@ -37,7 +37,7 @@ import info.nightscout.androidaps.events.EventAppInitialized;
|
|||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||
import info.nightscout.androidaps.events.EventRefreshOverview;
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider;
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue;
|
||||
import info.nightscout.androidaps.interfaces.PluginDescription;
|
||||
import info.nightscout.androidaps.interfaces.PluginType;
|
||||
import info.nightscout.androidaps.interfaces.Profile;
|
||||
|
@ -177,7 +177,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements Pump, Riley
|
|||
ErosPodStateManager podStateManager,
|
||||
ErosHistory erosHistory,
|
||||
AapsOmnipodErosManager aapsOmnipodErosManager,
|
||||
CommandQueueProvider commandQueue,
|
||||
CommandQueue commandQueue,
|
||||
FabricPrivacy fabricPrivacy,
|
||||
RileyLinkServiceData rileyLinkServiceData,
|
||||
DateUtil dateUtil,
|
||||
|
|
|
@ -8,7 +8,7 @@ import android.os.HandlerThread
|
|||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.activities.ErrorHelperActivity
|
||||
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||
import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange
|
||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog.RileyLinkStatusActivity
|
||||
|
@ -45,7 +45,7 @@ class ErosPodManagementActivity : NoSplashAppCompatActivity() {
|
|||
|
||||
@Inject lateinit var rxBus: RxBus
|
||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var podStateManager: ErosPodStateManager
|
||||
@Inject lateinit var injector: HasAndroidInjector
|
||||
@Inject lateinit var rileyLinkServiceData: RileyLinkServiceData
|
||||
|
|
|
@ -5,7 +5,6 @@ import android.graphics.Color
|
|||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.HandlerThread
|
||||
import android.os.Looper
|
||||
import android.text.TextUtils
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
|
@ -15,7 +14,7 @@ import info.nightscout.androidaps.Constants
|
|||
import info.nightscout.androidaps.activities.ErrorHelperActivity
|
||||
import info.nightscout.androidaps.events.EventPreferenceChange
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification
|
||||
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
|
||||
|
@ -72,7 +71,7 @@ class OmnipodErosOverviewFragment : DaggerFragment() {
|
|||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||
@Inject lateinit var rh: ResourceHelper
|
||||
@Inject lateinit var rxBus: RxBus
|
||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var commandQueue: CommandQueue
|
||||
@Inject lateinit var activePlugin: ActivePlugin
|
||||
@Inject lateinit var omnipodErosPumpPlugin: OmnipodErosPumpPlugin
|
||||
@Inject lateinit var podStateManager: ErosPodStateManager
|
||||
|
|
|
@ -3,7 +3,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivat
|
|||
import androidx.annotation.StringRes
|
||||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.data.PumpEnactResult
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandDeactivatePod
|
||||
|
@ -16,7 +16,7 @@ import javax.inject.Inject
|
|||
|
||||
class ErosDeactivatePodViewModel @Inject constructor(
|
||||
private val aapsOmnipodManager: AapsOmnipodErosManager,
|
||||
private val commandQueueProvider: CommandQueueProvider,
|
||||
private val commandQueue: CommandQueue,
|
||||
injector: HasAndroidInjector,
|
||||
logger: AAPSLogger,
|
||||
aapsSchedulers: AapsSchedulers
|
||||
|
@ -24,7 +24,7 @@ class ErosDeactivatePodViewModel @Inject constructor(
|
|||
|
||||
override fun doExecuteAction(): Single<PumpEnactResult> =
|
||||
Single.create { source ->
|
||||
commandQueueProvider.customCommand(CommandDeactivatePod(), object : Callback() {
|
||||
commandQueue.customCommand(CommandDeactivatePod(), object : Callback() {
|
||||
override fun run() {
|
||||
source.onSuccess(result)
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import dagger.android.HasAndroidInjector
|
|||
import info.nightscout.androidaps.TestBase
|
||||
import info.nightscout.androidaps.data.PumpEnactResult
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
import info.nightscout.androidaps.interfaces.Profile
|
||||
import info.nightscout.androidaps.interfaces.PumpSync
|
||||
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||
|
@ -36,7 +36,7 @@ class OmnipodErosPumpPluginTest : TestBase() {
|
|||
@Mock(answer = Answers.RETURNS_DEEP_STUBS) lateinit var activePlugin: ActivePlugin
|
||||
@Mock lateinit var aapsOmnipodErosManager: AapsOmnipodErosManager
|
||||
@Mock lateinit var erosHistory: ErosHistory
|
||||
@Mock lateinit var commandQueueProvider: CommandQueueProvider
|
||||
@Mock lateinit var commandQueue: CommandQueue
|
||||
@Mock lateinit var rileyLinkUtil: RileyLinkUtil
|
||||
@Mock lateinit var pumpSync: PumpSync
|
||||
|
||||
|
@ -53,7 +53,7 @@ class OmnipodErosPumpPluginTest : TestBase() {
|
|||
// mock all the things
|
||||
val plugin = OmnipodErosPumpPlugin(
|
||||
injector, aapsLogger, TestAapsSchedulers(), rxBusWrapper, null,
|
||||
rh, activePlugin, null, null, erosHistory, aapsOmnipodErosManager, commandQueueProvider,
|
||||
rh, activePlugin, null, null, erosHistory, aapsOmnipodErosManager, commandQueue,
|
||||
null, null, null, null,
|
||||
rileyLinkUtil, null, null, pumpSync
|
||||
)
|
||||
|
|
|
@ -45,7 +45,7 @@ abstract class PumpPluginAbstract protected constructor(
|
|||
injector: HasAndroidInjector?,
|
||||
rh: ResourceHelper,
|
||||
aapsLogger: AAPSLogger,
|
||||
commandQueue: CommandQueueProvider,
|
||||
commandQueue: CommandQueue,
|
||||
var rxBus: RxBus,
|
||||
var activePlugin: ActivePlugin,
|
||||
var sp: SP,
|
||||
|
|
Loading…
Reference in a new issue