format
This commit is contained in:
parent
e51d071181
commit
6ee4ec1ae3
1 changed files with 6 additions and 5 deletions
|
@ -203,7 +203,8 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
if (podStateManager.activeCommand == null) {
|
if (podStateManager.activeCommand == null) {
|
||||||
// suspend delivery is confirmed
|
// suspend delivery is confirmed
|
||||||
deliverySuspended = true
|
deliverySuspended = true
|
||||||
} },
|
}
|
||||||
|
},
|
||||||
historyEntry = history.createRecord(commandType = OmnipodCommandType.SET_BASAL_PROFILE),
|
historyEntry = history.createRecord(commandType = OmnipodCommandType.SET_BASAL_PROFILE),
|
||||||
activeCommandEntry = { historyId ->
|
activeCommandEntry = { historyId ->
|
||||||
podStateManager.createActiveCommand(historyId, basalProgram = basalProgram)
|
podStateManager.createActiveCommand(historyId, basalProgram = basalProgram)
|
||||||
|
@ -389,7 +390,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
if (detailedBolusInfo.bolusType == DetailedBolusInfo.BolusType.SMB) {
|
if (detailedBolusInfo.bolusType == DetailedBolusInfo.BolusType.SMB) {
|
||||||
notifyOnUnconfirmed(
|
notifyOnUnconfirmed(
|
||||||
Notification.OMNIPOD_UNCERTAIN_SMB,
|
Notification.OMNIPOD_UNCERTAIN_SMB,
|
||||||
"Unable to verify whether SMB bolus (${requestedBolusAmount} U) succeeded. " +
|
"Unable to verify whether SMB bolus ($requestedBolusAmount U) succeeded. " +
|
||||||
"<b>Refresh pod status to confirm or deny this command.",
|
"<b>Refresh pod status to confirm or deny this command.",
|
||||||
R.raw.boluserror
|
R.raw.boluserror
|
||||||
)
|
)
|
||||||
|
@ -711,7 +712,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
return executeProgrammingCommand(
|
return executeProgrammingCommand(
|
||||||
historyEntry = history.createRecord(OmnipodCommandType.CANCEL_TEMPORARY_BASAL),
|
historyEntry = history.createRecord(OmnipodCommandType.CANCEL_TEMPORARY_BASAL),
|
||||||
command = omnipodManager.stopTempBasal(hasTempBasalBeepEnabled()).ignoreElements(),
|
command = omnipodManager.stopTempBasal(hasTempBasalBeepEnabled()).ignoreElements(),
|
||||||
).doOnComplete{
|
).doOnComplete {
|
||||||
notifyOnUnconfirmed(
|
notifyOnUnconfirmed(
|
||||||
Notification.OMNIPOD_TBR_ALERTS,
|
Notification.OMNIPOD_TBR_ALERTS,
|
||||||
"Cancel temp basal result is uncertain", // TODO: i8n,
|
"Cancel temp basal result is uncertain", // TODO: i8n,
|
||||||
|
@ -863,7 +864,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
historyEntry = history.createRecord(OmnipodCommandType.RESUME_DELIVERY),
|
historyEntry = history.createRecord(OmnipodCommandType.RESUME_DELIVERY),
|
||||||
command = omnipodManager.setBasalProgram(mapProfileToBasalProgram(it), hasBasalBeepEnabled())
|
command = omnipodManager.setBasalProgram(mapProfileToBasalProgram(it), hasBasalBeepEnabled())
|
||||||
.ignoreElements()
|
.ignoreElements()
|
||||||
).doFinally{
|
).doFinally {
|
||||||
notifyOnUnconfirmed(
|
notifyOnUnconfirmed(
|
||||||
Notification.PUMP_ERROR,
|
Notification.PUMP_ERROR,
|
||||||
"Unconfirmed resumeDelivery command. Please refresh pod status",
|
"Unconfirmed resumeDelivery command. Please refresh pod status",
|
||||||
|
@ -877,7 +878,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
val ret = executeProgrammingCommand(
|
val ret = executeProgrammingCommand(
|
||||||
historyEntry = history.createRecord(OmnipodCommandType.DEACTIVATE_POD),
|
historyEntry = history.createRecord(OmnipodCommandType.DEACTIVATE_POD),
|
||||||
command = omnipodManager.deactivatePod().ignoreElements()
|
command = omnipodManager.deactivatePod().ignoreElements()
|
||||||
).doOnComplete{
|
).doOnComplete {
|
||||||
rxBus.send(EventDismissNotification(Notification.OMNIPOD_POD_FAULT))
|
rxBus.send(EventDismissNotification(Notification.OMNIPOD_POD_FAULT))
|
||||||
}.toPumpEnactResult()
|
}.toPumpEnactResult()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue