From e6c9e13d510a723d7aab1aebf018d7350b5b8de8 Mon Sep 17 00:00:00 2001 From: swissalpine Date: Thu, 30 Nov 2023 11:48:38 +0100 Subject: [PATCH] Rework --- .../app/aaps/plugins/sync/garmin/LoopHubImpl.kt | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/LoopHubImpl.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/LoopHubImpl.kt index aa8c3f7021..1e9f19ae7f 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/LoopHubImpl.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/LoopHubImpl.kt @@ -67,8 +67,8 @@ class LoopHubImpl @Inject constructor( get() = iobCobCalculator.calculateIobFromBolus().iob /** Returns the remaining bolus and basal insulin on board. */ - override val insulinTotalOnboard :Double - get() = iobCobCalculator.calculateIobFromBolus().iob + iobCobCalculator.calculateIobFromTempBasalsIncludingConvertedExtended().basaliob + override val insulinBasalOnboard :Double + get() = iobCobCalculator.calculateIobFromTempBasalsIncludingConvertedExtended().basaliob /** Returns the remaining carbs on board. */ override val carbsOnboard: Double? @@ -93,13 +93,6 @@ class LoopHubImpl @Inject constructor( 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. */ override fun connectPump() { repo.runTransaction(