Merge pull request #893 from 0pen-dash/avereha/fix-bolus
Avereha/fix bolus
This commit is contained in:
commit
43287f6dca
2 changed files with 42 additions and 37 deletions
|
@ -625,15 +625,20 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
)
|
||||
}
|
||||
}
|
||||
}.toSingleDefault(
|
||||
}.toSingle {
|
||||
PumpEnactResult(injector).success(true).enacted(true).bolusDelivered(deliveredBolusAmount)
|
||||
)
|
||||
.onErrorReturnItem(
|
||||
}.onErrorReturnItem(
|
||||
// success if canceled
|
||||
PumpEnactResult(injector).success(bolusCanceled).enacted(false)
|
||||
)
|
||||
.blockingGet()
|
||||
aapsLogger.info(LTag.PUMP, "deliverTreatment result: $ret")
|
||||
aapsLogger.info(
|
||||
LTag.PUMP,
|
||||
"deliverTreatment result: $ret. " +
|
||||
"deliveredBolusAmount=$deliveredBolusAmount. " +
|
||||
"ret bolus=${ret.bolusDelivered}" +
|
||||
"bolusCanceled=$bolusCanceled"
|
||||
)
|
||||
return ret
|
||||
} finally {
|
||||
bolusCanceled = false
|
||||
|
|
Loading…
Reference in a new issue