Просмотр исходного кода

Make sure to use the adjusted targetGlucose for forecasting

Sam King 6 месяцев назад
Родитель
Сommit
938e625a9d

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

@@ -119,7 +119,7 @@ enum ForecastGenerator {
             remainingCarbImpactPeak: carbImpactParams.remainingCarbImpactPeak,
             fractionCarbsLeft: mealData.carbs > 0 ? mealData.mealCOB / mealData.carbs : Decimal(0),
             threshold: threshold,
-            targetGlucose: profile.minBg ?? 100,
+            targetGlucose: targetGlucose,
             currentGlucose: glucose
         )
 

+ 1 - 1
TrioTests/OpenAPSSwiftTests/DetermineBasalJsonTests.swift

@@ -103,7 +103,7 @@ import Testing
         // this test is meant for one-off analysis so it's ok to hard code
         // a file, just make sure to _not_ check in updates to this to
         // avoid polluting our change logs
-        let algorithmComparison = try await HttpFiles.downloadFile(at: "/files/363f5452-9a76-436a-9d0e-b577d26231ee.0.json")
+        let algorithmComparison = try await HttpFiles.downloadFile(at: "/files/240ecbe9-5903-46ca-a4af-a4a0aebbf8a0.1.json")
         let determineBasalInput = algorithmComparison.determineBasalInput!
 
         let encoder = JSONCoding.encoder