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