Browse Source

fix SkipNeutraltemps

help update
oref adjustment
Robert 1 year ago
parent
commit
71d431d760

File diff suppressed because it is too large
+ 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.")
                     }
                 )
 

+ 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;