فهرست منبع

Update the IoB netBasalAmount calculation rounding to jsRounding

Sam King 5 ماه پیش
والد
کامیت
03fe3a7c44

+ 1 - 1
Trio/Sources/APS/OpenAPSSwift/Iob/IobHistory.swift

@@ -423,7 +423,7 @@ struct IobHistory {
         let netBasalRate = tempBasalRate - currentRate
         let netBasalRate = tempBasalRate - currentRate
         let tempBolusSize: Decimal = netBasalRate < 0 ? -0.05 : 0.05
         let tempBolusSize: Decimal = netBasalRate < 0 ? -0.05 : 0.05
 
 
-        let netBasalAmountTmp = (netBasalRate * duration * 10 / 6).rounded()
+        let netBasalAmountTmp = (netBasalRate * duration * 10 / 6).jsRounded()
         let netBasalAmount = netBasalAmountTmp / Decimal(100)
         let netBasalAmount = netBasalAmountTmp / Decimal(100)
         // FIXME: I think the count should be floor not rounded due to pump implementation artifacts
         // FIXME: I think the count should be floor not rounded due to pump implementation artifacts
         let tempBolusCount = Int((netBasalAmount / tempBolusSize).rounded())
         let tempBolusCount = Int((netBasalAmount / tempBolusSize).rounded())

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
TrioTests/OpenAPSSwiftTests/javascript/bundle/autosens.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
TrioTests/OpenAPSSwiftTests/javascript/bundle/autotune-prep.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
TrioTests/OpenAPSSwiftTests/javascript/bundle/iob-history.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
TrioTests/OpenAPSSwiftTests/javascript/bundle/iob.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
TrioTests/OpenAPSSwiftTests/javascript/bundle/meal.js