فهرست منبع

Display current oref0 threshold when bolus alert about dropping below threshold.
Bug fix.

Jon Mårtensson 2 سال پیش
والد
کامیت
a0c38900f4

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
FreeAPS/Resources/javascript/bundle/determine-basal.js


+ 2 - 0
FreeAPS/Sources/Models/Suggestion.swift

@@ -28,6 +28,7 @@ struct Suggestion: JSON, Equatable {
     let expectedDelta: Decimal?
     let minGuardBG: Decimal?
     let minPredBG: Decimal?
+    let threshold: Decimal?
 }
 
 struct Predictions: JSON, Equatable {
@@ -73,6 +74,7 @@ extension Suggestion {
         case expectedDelta
         case minGuardBG
         case minPredBG
+        case threshold
     }
 }
 

+ 1 - 2
FreeAPS/Sources/Modules/Bolus/BolusStateModel.swift

@@ -33,8 +33,7 @@ extension Bolus {
             broadcaster.register(SuggestionObserver.self, observer: self)
             units = settingsManager.settings.units
             percentage = settingsManager.settings.insulinReqPercentage
-            threshold = units == .mmolL ? settingsManager.preferences.threshold_setting.asMmolL : settingsManager.preferences
-                .threshold_setting
+            threshold = provider.suggestion?.threshold ?? 0
 
             if waitForSuggestionInitial {
                 apsManager.determineBasal()