add details about TBR
This commit is contained in:
parent
863fb19ff0
commit
d4a73abbf3
1 changed files with 4 additions and 2 deletions
|
@ -529,7 +529,9 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
.map { pumpSyncTempBasal(absoluteRate, durationInMinutes.toLong(), tbrType) }
|
.map { pumpSyncTempBasal(absoluteRate, durationInMinutes.toLong(), tbrType) }
|
||||||
.ignoreElements(),
|
.ignoreElements(),
|
||||||
).toPumpEnactResult()
|
).toPumpEnactResult()
|
||||||
// TODO: add details about TBR
|
if (ret.success && ret.enacted) {
|
||||||
|
ret.isPercent(false).absolute(absoluteRate).duration(durationInMinutes)
|
||||||
|
}
|
||||||
aapsLogger.info(LTag.PUMP, "setTempBasalAbsolute: result=$ret")
|
aapsLogger.info(LTag.PUMP, "setTempBasalAbsolute: result=$ret")
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
@ -623,7 +625,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
).toPumpEnactResult()
|
).toPumpEnactResult()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Completable.toPumpEnactResult(): PumpEnactResult {
|
private fun Completable.toPumpEnactResult(): PumpEnactResult {
|
||||||
return this.toSingleDefault(PumpEnactResult(injector).success(true).enacted(true))
|
return this.toSingleDefault(PumpEnactResult(injector).success(true).enacted(true))
|
||||||
.doOnError { throwable ->
|
.doOnError { throwable ->
|
||||||
aapsLogger.error(LTag.PUMP, "toPumpEnactResult, error executing command: $throwable")
|
aapsLogger.error(LTag.PUMP, "toPumpEnactResult, error executing command: $throwable")
|
||||||
|
|
Loading…
Reference in a new issue