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

Merge branch 'settings-update' of https://github.com/tmhastings/Trio-dev into settings-update

tmhastings 1 год назад
Родитель
Сommit
b7d5998055

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


+ 5 - 3
FreeAPS/Sources/Modules/AlgorithmAdvancedSettings/View/AlgorithmAdvancedSettingsRootView.swift

@@ -162,14 +162,16 @@ extension AlgorithmAdvancedSettings {
                     units: state.units,
                     type: .boolean,
                     label: NSLocalizedString("Skip Neutral Temps", comment: "Skip Neutral Temps"),
-                    miniHint: "Skip neutral temporary basal rates to reduce pump alerts.",
+                    miniHint: "Skip neutral temporary basal rates to reduce MDT pump alerts.",
                     verboseHint:
                     VStack(alignment: .leading, spacing: 10) {
                         Text("Default: OFF").bold()
                         Text(
-                            "When Skip Neutral Temps is enabled, Trio will not set neutral basal rates, minimizing hourly pump alerts. This can help light sleepers avoid alerts but may delay basal adjustments if the pump loses connection."
+                            "When Skip Neutral Temps is enabled, Trio will not set neutral basal rates shortly before the hour, minimizing hourly pump alerts on MDT pumps. This can help light sleepers avoid alerts but will delay basal adjustments. This will also only come into effect if SMB's are disabled for whatever reason."
+                        )
+                        Text(
+                            "For most users, leaving this OFF is recommended to ensure consistent basal delivery and loop calculation. If this option is effective, loops will be skipped during the last 5 minutes of the hour."
                         )
-                        Text("For most users, leaving this OFF is recommended to ensure consistent basal delivery.")
                     }
                 )
 

+ 3 - 1
FreeAPS/Sources/Modules/GeneralSettings/View/UnitsLimitsSettingsRootView.swift

@@ -108,6 +108,7 @@ extension UnitsLimitsSettings {
                         Text(
                             "This is the maximum basal rate allowed to be set or scheduled. This applies to both automatic and manual basal rates."
                         )
+                        Text("Note to Medtronic Pump Users: You must also manually set the max basal rate on the pump to this value or higher.")
                     }
                 )
 
@@ -128,10 +129,11 @@ extension UnitsLimitsSettings {
                     miniHint: "Maximum Carbs On Board (COB) allowed.",
                     verboseHint:
                     VStack(alignment: .leading, spacing: 10) {
-                        Text("Default: 120 carbs").bold()
+                        Text("Default: 120 grams of carbs").bold()
                         Text(
                             "This setting defines the maximum amount of Carbs On Board (COB) at any given time for Trio to use in dosing calculations. If more carbs are entered than allowed by this limit, Trio will cap the current COB in calculations to Max COB and remain at max until all remaining carbs have shown to be absorbed."
                         )
+                        Text("For example, if Max COB is 120g and you enter a meal containing 150g of carbs, your COB will remain at 120g until the remaining 30g have been absorbed.")
                         Text("This is an important limit when UAM is ON.")
                     }
                 )

+ 2 - 1
FreeAPS/Sources/Modules/SMBSettings/View/SMBSettingsRootView.swift

@@ -36,8 +36,9 @@ extension SMBSettings {
                     verboseHint: VStack(alignment: .leading, spacing: 10) {
                         Text("Default: OFF").bold()
                         Text(
-                            "When enabled, Super Micro Boluses (SMBs) will always be allowed if dosing calculations determine insulin is needed via the SMB delivery method, except in instances where a high Temp Target is set."
+                            "When enabled, Super Micro Boluses (SMBs) will always be allowed if dosing calculations determine insulin is needed via the SMB delivery method, except when a high Temp Target is set. Enabling SMB Always will remove redundant \"Enable SMB\" options when this setting is enacted."
                         )
+                        Text("Note: If you would like to allow SMBs when a high Temp Target is set, enable the \"Allow SMBs with High Temptarget\" setting.)
                     },
                     headerText: "Super-Micro-Bolus"
                 )

+ 2 - 1
oref0_source_version.txt

@@ -1,6 +1,7 @@
-oref0 branch: dev - git version: 0ff47a3
+oref0 branch: dev - git version: 22603e2
 
 Last commits:
+22603e2 skip_NetralTemps only if SMB's somehow disabled
 0ff47a3 fix weightedAverage, always calculate TDD
 e274bb0 revert to standard HBT calculation
 363fd11 Merge pull request #28 from bjornoleh/harmonise_defaults

+ 6 - 2
trio-oref/lib/determine-basal/determine-basal.js

@@ -1691,8 +1691,12 @@ var maxDelta_bg_threshold;
     // if not in LGS mode, cancel temps before the top of the hour to reduce beeping/vibration
     // console.error(profile.skip_neutral_temps, rT.deliverAt.getMinutes());
     if ( profile.skip_neutral_temps && rT.deliverAt.getMinutes() >= 55 ) {
-        rT.reason += "; Canceling temp at " + rT.deliverAt.getMinutes() + "m past the hour. ";
-        return tempBasalFunctions.setTempBasal(0, 0, profile, rT, currenttemp);
+        if (!enableSMB) {
+            rT.reason += "; Canceling temp at " + (60 - rT.deliverAt.getMinutes()) + "min before turn of the hour to avoid beeping of MDT. SMB are disabled anyways.";
+            return tempBasalFunctions.setTempBasal(0, 0, profile, rT, currenttemp);
+        } else {
+             console.error((60 - rT.deliverAt.getMinutes()) + "min before turn of the hour, but SMB's are enabled - not skipping neutral temps.")
+        }
     }
 
     var insulinReq = 0;