فهرست منبع

update weightPercentage default to 0.35

Updates `Weighted Average of TDD` for Dynamic ISF to 35% from 65%. This tips the default weighting towards the less volatile 10-day TDD average.
Mike Plante 1 سال پیش
والد
کامیت
cc69eda675

+ 1 - 1
FreeAPS/Resources/json/defaults/preferences.json

@@ -45,7 +45,7 @@
   "enableDynamicCR" : false,
   "enableDynamicCR" : false,
   "useNewFormula" : false,
   "useNewFormula" : false,
   "useWeightedAverage" : false,
   "useWeightedAverage" : false,
-  "weightPercentage" : 0.65,
+  "weightPercentage" : 0.35,
   "tddAdjBasal" : false,
   "tddAdjBasal" : false,
   "enableSMB_high_bg" : false,
   "enableSMB_high_bg" : false,
   "enableSMB_high_bg_target" : 110,
   "enableSMB_high_bg_target" : 110,

+ 1 - 1
FreeAPS/Sources/APS/OpenAPS/OpenAPS.swift

@@ -359,7 +359,7 @@ final class OpenAPS {
         await context.perform {
         await context.perform {
             let preferences = self.storage.retrieve(OpenAPS.Settings.preferences, as: Preferences.self)
             let preferences = self.storage.retrieve(OpenAPS.Settings.preferences, as: Preferences.self)
             var hbt_ = preferences?.halfBasalExerciseTarget ?? 160
             var hbt_ = preferences?.halfBasalExerciseTarget ?? 160
-            let wp = preferences?.weightPercentage ?? 1
+            let wp = preferences?.weightPercentage ?? 0.35
             let smbMinutes = (preferences?.maxSMBBasalMinutes ?? 30) as NSDecimalNumber
             let smbMinutes = (preferences?.maxSMBBasalMinutes ?? 30) as NSDecimalNumber
             let uamMinutes = (preferences?.maxUAMSMBBasalMinutes ?? 30) as NSDecimalNumber
             let uamMinutes = (preferences?.maxUAMSMBBasalMinutes ?? 30) as NSDecimalNumber
 
 

+ 1 - 1
FreeAPS/Sources/Models/DecimalPickerSettings.swift

@@ -127,7 +127,7 @@ struct DecimalPickerSettings {
         max: 2,
         max: 2,
         type: PickerSetting.PickerSettingType.factor
         type: PickerSetting.PickerSettingType.factor
     )
     )
-    var weightPercentage = PickerSetting(value: 0.65, step: 0.1, min: 0.1, max: 1, type: PickerSetting.PickerSettingType.factor)
+    var weightPercentage = PickerSetting(value: 0.35, step: 0.05, min: 0.05, max: 1, type: PickerSetting.PickerSettingType.factor)
     var enableSMB_high_bg_target = PickerSetting(
     var enableSMB_high_bg_target = PickerSetting(
         value: 110,
         value: 110,
         step: 1,
         step: 1,

+ 1 - 1
FreeAPS/Sources/Models/Preferences.swift

@@ -48,7 +48,7 @@ struct Preferences: JSON {
     var enableDynamicCR: Bool = false
     var enableDynamicCR: Bool = false
     var useNewFormula: Bool = false
     var useNewFormula: Bool = false
     var useWeightedAverage: Bool = false
     var useWeightedAverage: Bool = false
-    var weightPercentage: Decimal = 0.65
+    var weightPercentage: Decimal = 0.35
     var tddAdjBasal: Bool = false
     var tddAdjBasal: Bool = false
     var enableSMB_high_bg: Bool = false
     var enableSMB_high_bg: Bool = false
     var enableSMB_high_bg_target: Decimal = 110
     var enableSMB_high_bg_target: Decimal = 110

+ 1 - 1
FreeAPS/Sources/Modules/DynamicSettings/DynamicSettingsStateModel.swift

@@ -11,7 +11,7 @@ extension DynamicSettings {
         var sigmoid: Bool = false
         var sigmoid: Bool = false
         var adjustmentFactor: Decimal = 0.8
         var adjustmentFactor: Decimal = 0.8
         var adjustmentFactorSigmoid: Decimal = 0.5
         var adjustmentFactorSigmoid: Decimal = 0.5
-        var weightPercentage: Decimal = 0.65
+        var weightPercentage: Decimal = 0.35
         var tddAdjBasal: Bool = false
         var tddAdjBasal: Bool = false
         var threshold_setting: Decimal = 60
         var threshold_setting: Decimal = 60
         var units: GlucoseUnits = .mgdL
         var units: GlucoseUnits = .mgdL

+ 1 - 1
FreeAPS/Sources/Modules/DynamicSettings/View/DynamicSettingsRootView.swift

@@ -249,7 +249,7 @@ extension DynamicSettings {
                                 "This setting adjusts how much weight is given to your recent total daily insulin dose when calculating Dynamic ISF and Dynamic CR."
                                 "This setting adjusts how much weight is given to your recent total daily insulin dose when calculating Dynamic ISF and Dynamic CR."
                             )
                             )
                             Text(
                             Text(
-                                "At the default setting, 65% of the calculation is based on the last 24 hours of insulin use, with the remaining 35% considering the last 10 days of data."
+                                "At the default setting, 35% of the calculation is based on the last 24 hours of insulin use, with the remaining 65% considering the last 10 days of data."
                             )
                             )
                             Text("Setting this to 100% means only the past 24 hours will be used.")
                             Text("Setting this to 100% means only the past 24 hours will be used.")
                             Text("A lower value smooths out these variations for more stability.")
                             Text("A lower value smooths out these variations for more stability.")