dismiss OMNIPOD_POD_NOT_ATTACHED on pod activation. add logging
This commit is contained in:
parent
4fc0a34785
commit
99ca414d87
2 changed files with 9 additions and 0 deletions
|
@ -198,6 +198,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun connect(reason: String) {
|
override fun connect(reason: String) {
|
||||||
|
aapsLogger.info(LTag.PUMP, "connect reason=$reason")
|
||||||
thread(
|
thread(
|
||||||
start = true,
|
start = true,
|
||||||
name = "ConnectionThread",
|
name = "ConnectionThread",
|
||||||
|
@ -215,11 +216,13 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun disconnect(reason: String) {
|
override fun disconnect(reason: String) {
|
||||||
|
aapsLogger.info(LTag.PUMP, "disconnect reason=$reason")
|
||||||
stopConnecting?.let { it.countDown() }
|
stopConnecting?.let { it.countDown() }
|
||||||
omnipodManager.disconnect()
|
omnipodManager.disconnect()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun stopConnecting() {
|
override fun stopConnecting() {
|
||||||
|
aapsLogger.info(LTag.PUMP, "stopConnecting")
|
||||||
stopConnecting?.let { it.countDown() }
|
stopConnecting?.let { it.countDown() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,9 @@ 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
|
||||||
import info.nightscout.androidaps.logging.LTag
|
import info.nightscout.androidaps.logging.LTag
|
||||||
|
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
||||||
|
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification
|
||||||
|
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
|
||||||
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
|
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.action.InsertCannulaViewModel
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.action.InsertCannulaViewModel
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.R
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.R
|
||||||
|
@ -23,6 +26,8 @@ class DashInsertCannulaViewModel @Inject constructor(
|
||||||
private val profileFunction: ProfileFunction,
|
private val profileFunction: ProfileFunction,
|
||||||
private val pumpSync: PumpSync,
|
private val pumpSync: PumpSync,
|
||||||
private val podStateManager: OmnipodDashPodStateManager,
|
private val podStateManager: OmnipodDashPodStateManager,
|
||||||
|
private val rxBus: RxBusWrapper,
|
||||||
|
|
||||||
injector: HasAndroidInjector,
|
injector: HasAndroidInjector,
|
||||||
logger: AAPSLogger
|
logger: AAPSLogger
|
||||||
) : InsertCannulaViewModel(injector, logger) {
|
) : InsertCannulaViewModel(injector, logger) {
|
||||||
|
@ -77,6 +82,7 @@ class DashInsertCannulaViewModel @Inject constructor(
|
||||||
pumpType = PumpType.OMNIPOD_DASH,
|
pumpType = PumpType.OMNIPOD_DASH,
|
||||||
pumpSerial = podStateManager.uniqueId?.toString() ?: "n/a"
|
pumpSerial = podStateManager.uniqueId?.toString() ?: "n/a"
|
||||||
)
|
)
|
||||||
|
rxBus.send(EventDismissNotification(Notification.OMNIPOD_POD_NOT_ATTACHED))
|
||||||
source.onSuccess(PumpEnactResult(injector).success(true))
|
source.onSuccess(PumpEnactResult(injector).success(true))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue