This commit is contained in:
swissalpine 2023-11-30 11:48:38 +01:00 committed by GitHub
parent 1e13237a5b
commit e6c9e13d51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,8 +67,8 @@ class LoopHubImpl @Inject constructor(
get() = iobCobCalculator.calculateIobFromBolus().iob get() = iobCobCalculator.calculateIobFromBolus().iob
/** Returns the remaining bolus and basal insulin on board. */ /** Returns the remaining bolus and basal insulin on board. */
override val insulinTotalOnboard :Double override val insulinBasalOnboard :Double
get() = iobCobCalculator.calculateIobFromBolus().iob + iobCobCalculator.calculateIobFromTempBasalsIncludingConvertedExtended().basaliob get() = iobCobCalculator.calculateIobFromTempBasalsIncludingConvertedExtended().basaliob
/** Returns the remaining carbs on board. */ /** Returns the remaining carbs on board. */
override val carbsOnboard: Double? override val carbsOnboard: Double?
@ -93,13 +93,6 @@ class LoopHubImpl @Inject constructor(
return if (apsResult == null) Double.NaN else apsResult.percent / 100.0 return if (apsResult == null) Double.NaN else apsResult.percent / 100.0
} }
/** Returns the temporary basal rate in percent */
override val temporaryBasalPercent: String
get() {
val apsResult = loop.lastRun?.constraintsProcessed
return if (apsResult == null) "--" else apsResult.percent.toString()
}
/** Tells the loop algorithm that the pump is physicallly connected. */ /** Tells the loop algorithm that the pump is physicallly connected. */
override fun connectPump() { override fun connectPump() {
repo.runTransaction( repo.runTransaction(