fix .bolusDelivered in the deliverTreatment response
This commit is contained in:
parent
247768c139
commit
e7f93145a0
1 changed files with 11 additions and 6 deletions
|
@ -625,15 +625,20 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.toSingleDefault(
|
}.toSingle {
|
||||||
PumpEnactResult(injector).success(true).enacted(true).bolusDelivered(deliveredBolusAmount)
|
PumpEnactResult(injector).success(true).enacted(true).bolusDelivered(deliveredBolusAmount)
|
||||||
|
}.onErrorReturnItem(
|
||||||
|
// success if canceled
|
||||||
|
PumpEnactResult(injector).success(bolusCanceled).enacted(false)
|
||||||
)
|
)
|
||||||
.onErrorReturnItem(
|
|
||||||
// success if canceled
|
|
||||||
PumpEnactResult(injector).success(bolusCanceled).enacted(false)
|
|
||||||
)
|
|
||||||
.blockingGet()
|
.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
|
return ret
|
||||||
} finally {
|
} finally {
|
||||||
bolusCanceled = false
|
bolusCanceled = false
|
||||||
|
|
Loading…
Reference in a new issue