Sam King 9 месяцев назад
Родитель
Сommit
1ed96bb63d

+ 2 - 2
Trio/Sources/APS/OpenAPSSwift/DetermineBasal/DetermineBasalGenerator.swift

@@ -254,8 +254,8 @@ enum DeterminationGenerator {
             predictions: Predictions(
             predictions: Predictions(
                 iob: forecastResult.iob.map { Int($0.jsRounded()) },
                 iob: forecastResult.iob.map { Int($0.jsRounded()) },
                 zt: forecastResult.zt.map { Int($0.jsRounded()) },
                 zt: forecastResult.zt.map { Int($0.jsRounded()) },
-                cob: forecastResult.cob.map { Int($0) },
-                uam: forecastResult.uam.map { Int($0) }
+                cob: forecastResult.cob.map { Int($0.jsRounded()) },
+                uam: forecastResult.uam.map { Int($0.jsRounded()) }
             ),
             ),
             deliverAt: currentTime,
             deliverAt: currentTime,
             carbsReq: nil,
             carbsReq: nil,

+ 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
         // 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
         // a file, just make sure to _not_ check in updates to this to
         // avoid polluting our change logs
         // avoid polluting our change logs
-        let algorithmComparison = try await HttpFiles.downloadFile(at: "/files/f5e63e4f-b5bc-421a-b5d8-87d3326a688a.0.json")
+        let algorithmComparison = try await HttpFiles.downloadFile(at: "/files/93450f65-2c8e-4c39-94b3-bf73309a7402.2.json")
         let determineBasalInput = algorithmComparison.determineBasalInput!
         let determineBasalInput = algorithmComparison.determineBasalInput!
 
 
         let encoder = JSONCoding.encoder
         let encoder = JSONCoding.encoder