commit
deee2bf6f8
1 changed files with 3 additions and 2 deletions
|
@ -1364,16 +1364,17 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
private fun handleCommandConfirmation(confirmation: CommandConfirmed) {
|
private fun handleCommandConfirmation(confirmation: CommandConfirmed) {
|
||||||
val command = confirmation.command
|
val command = confirmation.command
|
||||||
val historyEntry = history.getById(command.historyId)
|
val historyEntry = history.getById(command.historyId)
|
||||||
aapsLogger.debug(LTag.PUMPCOMM, "handling command confirmation: $confirmation")
|
aapsLogger.debug(LTag.PUMPCOMM, "handling command confirmation: $confirmation ${historyEntry.commandType}")
|
||||||
when (historyEntry.commandType) {
|
when (historyEntry.commandType) {
|
||||||
OmnipodCommandType.CANCEL_TEMPORARY_BASAL -> {
|
OmnipodCommandType.CANCEL_TEMPORARY_BASAL -> {
|
||||||
if (confirmation.success) {
|
if (confirmation.success) {
|
||||||
pumpSync.syncStopTemporaryBasalWithPumpId(
|
val ret = pumpSync.syncStopTemporaryBasalWithPumpId(
|
||||||
historyEntry.createdAt,
|
historyEntry.createdAt,
|
||||||
historyEntry.pumpId(),
|
historyEntry.pumpId(),
|
||||||
PumpType.OMNIPOD_DASH,
|
PumpType.OMNIPOD_DASH,
|
||||||
serialNumber()
|
serialNumber()
|
||||||
)
|
)
|
||||||
|
aapsLogger.info(LTag.PUMP, "syncStopTemporaryBasalWithPumpId ret=$ret")
|
||||||
podStateManager.tempBasal = null
|
podStateManager.tempBasal = null
|
||||||
}
|
}
|
||||||
rxBus.send(EventDismissNotification(Notification.OMNIPOD_TBR_ALERTS))
|
rxBus.send(EventDismissNotification(Notification.OMNIPOD_TBR_ALERTS))
|
||||||
|
|
Loading…
Reference in a new issue