Merge branch 'dev' of https://github.com/nightscout/AndroidAPS into dev
This commit is contained in:
commit
1839c7513d
1 changed files with 20 additions and 21 deletions
|
@ -228,31 +228,30 @@ class ComboV2Plugin @Inject constructor (
|
|||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
pumpCoroutineScope.launch {
|
||||
aapsLogger.debug(LTag.PUMP, "Creating bluetooth interface")
|
||||
bluetoothInterface = AndroidBluetoothInterface(context)
|
||||
|
||||
aapsLogger.debug(LTag.PUMP, "Setting up bluetooth interface")
|
||||
bluetoothInterface!!.setup()
|
||||
aapsLogger.debug(LTag.PUMP, "Creating bluetooth interface")
|
||||
bluetoothInterface = AndroidBluetoothInterface(context)
|
||||
|
||||
aapsLogger.debug(LTag.PUMP, "Setting up pump manager")
|
||||
pumpManager = ComboCtlPumpManager(bluetoothInterface!!, pumpStateStore)
|
||||
pumpManager!!.setup {
|
||||
_pairedStateUIFlow.value = false
|
||||
}
|
||||
aapsLogger.debug(LTag.PUMP, "Setting up bluetooth interface")
|
||||
bluetoothInterface!!.setup()
|
||||
|
||||
// UI flows that must have defined values right
|
||||
// at start are initialized here.
|
||||
|
||||
// The paired state UI flow is special in that it is also
|
||||
// used as the backing store for the isPaired() function,
|
||||
// so setting up that UI state flow equals updating that
|
||||
// paired state.
|
||||
val paired = pumpManager!!.getPairedPumpAddresses().isNotEmpty()
|
||||
_pairedStateUIFlow.value = paired
|
||||
|
||||
setDriverState(DriverState.Disconnected)
|
||||
aapsLogger.debug(LTag.PUMP, "Setting up pump manager")
|
||||
pumpManager = ComboCtlPumpManager(bluetoothInterface!!, pumpStateStore)
|
||||
pumpManager!!.setup {
|
||||
_pairedStateUIFlow.value = false
|
||||
}
|
||||
|
||||
// UI flows that must have defined values right
|
||||
// at start are initialized here.
|
||||
|
||||
// The paired state UI flow is special in that it is also
|
||||
// used as the backing store for the isPaired() function,
|
||||
// so setting up that UI state flow equals updating that
|
||||
// paired state.
|
||||
val paired = pumpManager!!.getPairedPumpAddresses().isNotEmpty()
|
||||
_pairedStateUIFlow.value = paired
|
||||
|
||||
setDriverState(DriverState.Disconnected)
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
|
|
Loading…
Reference in a new issue