Просмотр исходного кода

Fix pump-history/TDD bug. ADD SMB DeliveryRatio to SMB settings

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

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
FreeAPS/Resources/javascript/bundle/determine-basal.js


+ 1 - 2
FreeAPS/Sources/APS/APSManager.swift

@@ -626,8 +626,7 @@ final class BaseAPSManager: APSManager, Injectable {
                 storage.save(averages, as: OpenAPS.Monitor.tdd_averages)
                 storage.save(Array(uniqEvents), as: file)
             }
-            
-            
+
             debug(.apsManager, "Suggestion enacted. Received: \(received)")
             DispatchQueue.main.async {
                 self.broadcaster.notify(EnactedSuggestionObserver.self, on: .main) {

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

@@ -222,6 +222,15 @@ extension PreferencesEditor {
                     settable: self
                 ),
                 Field(
+                    displayName: "SMB DeliveryRatio",
+                    type: .decimal(keypath: \.smbDeliveryRatio),
+                    infoText: NSLocalizedString(
+                        "Default value: 0.5 This is another key OpenAPS safety cap, and specifies what share of the total insulin required can be delivered as SMB. This is to prevent people from getting into dangerous territory by setting SMB requests from the caregivers phone at the same time. Increase this experimental value slowly and with caution.",
+                        comment: "SMB DeliveryRatio"
+                    ),
+                    settable: self
+                ),
+                Field(
                     displayName: "SMB Interval",
                     type: .decimal(keypath: \.smbInterval),
                     infoText: NSLocalizedString("Minimum duration in minutes between two enacted SMBs", comment: "SMB Interval"),
@@ -504,15 +513,6 @@ extension PreferencesEditor {
                     settable: self
                 ),
                 Field(
-                    displayName: "SMB DeliveryRatio",
-                    type: .decimal(keypath: \.smbDeliveryRatio),
-                    infoText: NSLocalizedString(
-                        "Default value: 0.5 This is another key OpenAPS safety cap, and specifies what share of the total insulin required can be delivered as SMB. This is to prevent people from getting into dangerous territory by setting SMB requests from the caregivers phone at the same time. Increase this experimental value slowly and with caution.",
-                        comment: "SMB DeliveryRatio"
-                    ),
-                    settable: self
-                ),
-                Field(
                     displayName: "SMB DeliveryRatio BG Range",
                     type: .decimal(keypath: \.smbDeliveryRatioBGrange),
                     infoText: NSLocalizedString(