Jon Mårtensson 4 лет назад
Родитель
Сommit
1775520051

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

@@ -65,6 +65,7 @@ struct Preferences: JSON {
     var adjustmentFactor: Decimal = 1.0
     var enableChris: Bool = true
     var enableDynamicCR: Bool = false
+    var useNewFormula: Bool = false
 }
 
 extension Preferences {
@@ -132,6 +133,7 @@ extension Preferences {
         case adjustmentFactor
         case enableChris
         case enableDynamicCR
+        case useNewFormula
     }
 }
 

+ 10 - 1
FreeAPS/Sources/Modules/PreferencesEditor/PreferencesEditorStateModel.swift

@@ -118,6 +118,15 @@ extension PreferencesEditor {
                         comment: "Use Dynamic CR together with Dynamic ISF"
                     ),
                     settable: self
+                ),
+                Field(
+                    displayName: "Use logaritmic formula",
+                    type: .boolean(keypath: \.useNewFormula),
+                    infoText: NSLocalizedString(
+                        "Use logaritmic formula",
+                        comment: "Use logaritmic formula"
+                    ),
+                    settable: self
                 )
             ]
 
@@ -616,7 +625,7 @@ extension PreferencesEditor {
                     displayName: NSLocalizedString("OpenAPS main settings", comment: "OpenAPS main settings"), fields: mainFields
                 ),
                 FieldSection(
-                    displayName: NSLocalizedString("Dynamic ISF settings", comment: "Dynamic ISF settings"),
+                    displayName: NSLocalizedString("Dynamic settings", comment: "Dynamic settings"),
                     fields: dynamicISF
                 ),
                 FieldSection(