Преглед изворни кода

establish toggle for BG acceleartion adaption in autoISF2.2

Robert пре 4 година
родитељ
комит
9a41d8dbf4

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
FreeAPS/Resources/javascript/bundle/determine-basal.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
FreeAPS/Resources/javascript/bundle/profile.js


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

@@ -60,6 +60,7 @@ struct Preferences: JSON {
     var postMealISFalways: Bool = false
     var bgAccelISFweight: Decimal = 0
     var bgBrakeISFweight: Decimal = 0
+    var enableBGacceleration: Bool = false
 }
 
 extension Preferences {
@@ -122,6 +123,7 @@ extension Preferences {
         case postMealISFalways = "enableppisf_always"
         case bgAccelISFweight = "bgAccel_ISF_weight"
         case bgBrakeISFweight = "bgBrake_ISF_weight"
+        case enableBGacceleration = "enable_BG_acceleration"
     }
 }
 

+ 9 - 0
FreeAPS/Sources/Modules/PreferencesEditor/PreferencesEditorStateModel.swift

@@ -405,6 +405,15 @@ extension PreferencesEditor {
                     settable: self
                 ),
                 Field(
+                    displayName: "Enable BG acceleartion in AutoISF",
+                    type: .boolean(keypath: \.enableBGacceleration),
+                    infoText: NSLocalizedString(
+                        "Enables the BG acceleration adaptiions for autoISF\n\nRead up on:\nhttps://github.com/ga-zelle/autoISF/tree/2.8.2dev_ai2.2",
+                        comment: "Enable BG accel in autoISF"
+                    ),
+                    settable: self
+                ),
+                Field(
                     displayName: "AutoISF HourlyMaxChange",
                     type: .decimal(keypath: \.autoISFhourlyChange),
                     infoText: NSLocalizedString(