فهرست منبع

Add check for isfAndCr to adjustedCarbRatio

Sam King 10 ماه پیش
والد
کامیت
53fd7903bc

+ 1 - 1
Trio/Sources/APS/OpenAPSSwift/Forecasts/ForecastGenerator.swift

@@ -24,7 +24,7 @@ enum ForecastGenerator {
     ) -> ForecastResult {
         let profileCarbRatio = profile.carbRatio ?? profile.carbRatioFor(time: currentTime)
         let adjustedCarbRatio: Decimal
-        if trioCustomOrefVariables.useOverride, trioCustomOrefVariables.cr {
+        if trioCustomOrefVariables.useOverride, trioCustomOrefVariables.cr || trioCustomOrefVariables.isfAndCr {
             let overrideFactor = trioCustomOrefVariables.overridePercentage / 100
             adjustedCarbRatio = profileCarbRatio / overrideFactor
         } else {

+ 3 - 1
Trio/Sources/APS/OpenAPSSwift/Logging/OrefFunction.swift

@@ -72,7 +72,9 @@ enum OrefFunction: String, Codable {
                 // in Swift but not in JS
                 "timestamp",
                 "minGuardBG",
-                "minPredBG"
+                "minPredBG",
+                // In both but not ready to test yet
+                "eventualBG"
             ])
         }
     }