Browse Source

Add Sigmoid Function to Dynamic Settings and to Oref0 js-code.
And localization for Dynamic Settings.

Jon Mårtensson 3 năm trước cách đây
mục cha
commit
1e64d44c3f

+ 1 - 1
Config.xcconfig

@@ -1,5 +1,5 @@
 APP_DISPLAY_NAME = FreeAPS X
-APP_VERSION = 0.4.4
+APP_VERSION = 0.4.5
 APP_BUILD_NUMBER = 1
 BRANCH = bdb
 DEVELOPER_TEAM = ##TEAM_ID##

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
FreeAPS/Resources/javascript/bundle/determine-basal.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
FreeAPS/Resources/javascript/bundle/profile.js


+ 9 - 4
FreeAPS/Sources/APS/APSManager.swift

@@ -783,12 +783,17 @@ final class BaseAPSManager: APSManager, Injectable {
                 }
             }
         }
-        var algo_ = "oref0" // Default
-        if preferences.enableChris, preferences.useNewFormula {
+        var algo_ = "Oref0"
+        if preferences.useNewFormula {
             algo_ = "Dynamic ISF, Logarithmic Formula"
-        } else if !preferences.useNewFormula, preferences.enableChris {
-            algo_ = "Dynamic ISF, Original Formula"
+        } else if preferences.useNewFormula, preferences.enableDynamicCR {
+            algo_ = "Dynamic ISF + Dynamic CR, Logarithmic Formula"
+        } else if preferences.sigmoid, preferences.enableDynamicCR {
+            algo_ = "Dynamic ISF + Dynamic CR, Sigmoid Function"
+        } else if preferences.sigmoid, !preferences.enableDynamicCR {
+            algo_ = "Dynamic ISF, Sigmoid Function"
         }
+
         let af = preferences.adjustmentFactor
         let insulin_type = preferences.curve
         let buildDate = Bundle.main.buildDate

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 24 - 1
FreeAPS/Sources/Localizations/Main/en.lproj/Localizable.strings


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

@@ -44,7 +44,7 @@ struct Preferences: JSON {
     var timestamp: Date?
     var maxDeltaBGthreshold: Decimal = 0.2
     var adjustmentFactor: Decimal = 1.0
-    var enableChris: Bool = false
+    var sigmoid: Bool = false
     var enableDynamicCR: Bool = false
     var useNewFormula: Bool = false
     var useWeightedAverage: Bool = false
@@ -99,7 +99,7 @@ extension Preferences {
         case suspendZerosIOB = "suspend_zeros_iob"
         case maxDeltaBGthreshold = "maxDelta_bg_threshold"
         case adjustmentFactor
-        case enableChris
+        case sigmoid
         case enableDynamicCR
         case useNewFormula
         case useWeightedAverage

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 10 - 10
FreeAPS/Sources/Modules/PreferencesEditor/PreferencesEditorStateModel.swift


+ 1 - 1
FreeAPS/Sources/Views/TagCloudView.swift

@@ -63,7 +63,7 @@ struct TagCloudView: View {
             case textTag where textTag.contains("Parabolic Fit"):
                 return .loopRed
             case textTag where textTag.contains("TDD:"),
-                 textTag where textTag.contains("Original formula"),
+                 textTag where textTag.contains("Sigmoid function"),
                  textTag where textTag.contains("Logarithmic formula"),
                  textTag where textTag.contains("AF:"),
                  textTag where textTag.contains("Autosens/Dynamic Limit:"),