Преглед изворни кода

Update miniHints and verboseHints

tmhastings пре 1 година
родитељ
комит
44de3943a7

+ 117 - 52
FreeAPS/Sources/Modules/AlgorithmAdvancedSettings/View/AlgorithmAdvancedSettingsRootView.swift

@@ -60,13 +60,23 @@ extension AlgorithmAdvancedSettings {
                     units: state.units,
                     type: .decimal("maxDailySafetyMultiplier"),
                     label: NSLocalizedString("Max Daily Safety Multiplier", comment: "Max Daily Safety Multiplier"),
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text(
-                        NSLocalizedString(
-                            "This is an important OpenAPS safety limit. The default setting (which is unlikely to need adjusting) is 3. This means that OpenAPS will never be allowed to set a temporary basal rate that is more than 3x the highest hourly basal rate programmed in a user’s pump, or, if enabled, determined by autotune.",
-                            comment: "Max Daily Safety Multiplier"
-                        )
-                    )
+                    miniHint: """
+                        Temporary basal rates cannot be set higher than this percentage of your LARGEST profile basal rate
+                        Default setting: 300%
+                        """,
+                    verboseHint: VStack {
+                        Text("Default: 300%").bold()
+                        Text("""
+                            
+                            This limits the automatic adjustment of the temporary basal rate to this value times the highest scheduled basal rate in your basal profile.
+                            
+                            """)
+                        Text("If Autotune is enabled, Trio uses Autotune basals instead of scheduled basals.").italic()
+                        Text("""
+                            
+                            Increasing this setting is not advised.
+                            """).bold().italic()
+                    }
                 )
 
                 SettingInputSection(
@@ -86,13 +96,23 @@ extension AlgorithmAdvancedSettings {
                     units: state.units,
                     type: .decimal("currentBasalSafetyMultiplier"),
                     label: NSLocalizedString("Current Basal Safety Multiplier", comment: "Current Basal Safety Multiplier"),
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text(
-                        NSLocalizedString(
-                            "This is another important OpenAPS safety limit. The default setting (which is also unlikely to need adjusting) is 4. This means that OpenAPS will never be allowed to set a temporary basal rate that is more than 4x the current hourly basal rate programmed in a user’s pump, or, if enabled, determined by autotune.",
-                            comment: "Current Basal Safety Multiplier"
-                        )
-                    )
+                    miniHint: """
+                        Temporary basal rates cannot be set higher than this percentage of the profile basal rate at the time of the loop cycle
+                        Default: 400%
+                        """,
+                    verboseHint: VStack {
+                        Text("Default: 400%").bold()
+                        Text("""
+                            
+                            This limits the automatic adjustment of the temporary basal rate to this percentage of the current hourly basal rate at the time of the loop cycle.
+                            
+                            """)
+                        Text("If Autotune is enabled, Trio uses Autotune basals instead of scheduled basals.").italic()
+                        Text("""
+                            
+                            Increasing this setting is not advised.
+                            """).bold().italic()
+                    }
                 )
 
                 SettingInputSection(
@@ -109,8 +129,19 @@ extension AlgorithmAdvancedSettings {
                     units: state.units,
                     type: .decimal("dia"),
                     label: "Duration of Insulin Action",
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text("Duration of Insulin Action… bla bla bla")
+                    miniHint: """
+                        Number of hours insulin will be active in your body
+                        Default: 6 hours
+                        """,
+                    verboseHint: VStack {
+                        Text("Default: 6 hours").bold()
+                        Text("""
+                            
+                            Number of hours insulin will contribute to IOB after dosing.
+                            
+                            """)
+                        Text("It is better to use Custom Peak Timing rather than adjust your Duration of Insulin Action (DIA)").italic()
+                    }
                 )
 
                 SettingInputSection(
@@ -128,13 +159,21 @@ extension AlgorithmAdvancedSettings {
                     type: .conditionalDecimal("insulinPeakTime"),
                     label: NSLocalizedString("Use Custom Peak Time", comment: "Use Custom Peak Time"),
                     conditionalLabel: NSLocalizedString("Insulin Peak Time", comment: "Insulin Peak Time"),
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text(NSLocalizedString(
-                        "Defaults to false. Setting to true allows changing insulinPeakTime", comment: "Use Custom Peak Time"
-                    ) + NSLocalizedString(
-                        "Time of maximum blood glucose lowering effect of insulin, in minutes. Beware: Oref assumes for ultra-rapid (Lyumjev) & rapid-acting (Fiasp) curves minimal (35 & 50 min) and maximal (100 & 120 min) applicable insulinPeakTimes. Using a custom insulinPeakTime outside these bounds will result in issues with Trio, longer loop calculations and possible red loops.",
-                        comment: "Insulin Peak Time"
-                    ))
+                    miniHint: """
+                        Time that insulin effect is at it’s highest. Set in minutes since injection.
+                        Default: (Set by Insulin Type)
+                        """,
+                    verboseHint: VStack {
+                        Text("Default: Set by Insulin Type").bold()
+                        Text("""
+                            
+                            Time of maximum glucose lowering effect of insulin. Set in minutes since insulin administration.
+                            
+                            System-Determined Defaults:
+                            Ultra-Rapid: 55 minutes (permitted range 35-100 minutes)
+                            Rapid-Acting: 75 minutes (permitted range 50-120 minutes)
+                            """)
+                    }
                 )
 
                 SettingInputSection(
@@ -151,13 +190,19 @@ extension AlgorithmAdvancedSettings {
                     units: state.units,
                     type: .boolean,
                     label: NSLocalizedString("Skip Neutral Temps", comment: "Skip Neutral Temps"),
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text(
-                        NSLocalizedString(
-                            "Defaults to false, so that Trio will set temps whenever it can, so it will be easier to see if the system is working, even when you are offline. This means Trio will set a “neutral” temp (same as your default basal) if no adjustments are needed. This is an old setting for OpenAPS to have the options to minimise sounds and notifications from the 'rig', that may wake you up during the night.",
-                            comment: "Skip Neutral Temps"
-                        )
-                    )
+                    miniHint: """
+                        When on, Trio will not send a temp basal command to the pump if the determined basal rate is the same as the scheduled basal
+                        Default: OFF
+                        """,
+                    verboseHint: VStack {
+                        Text("Default: OFF").bold()
+                        Text("""
+                            
+                            When enabled, Trio will skip neutral temp basals (those that are the same as your default basal), if no adjustments are needed. 
+                            
+                            When off, Trio will set temps whenever it can, so it will be easier to see if the system is working.
+                            """)
+                    }
                 )
 
                 SettingInputSection(
@@ -174,13 +219,19 @@ extension AlgorithmAdvancedSettings {
                     units: state.units,
                     type: .boolean,
                     label: NSLocalizedString("Unsuspend If No Temp", comment: "Unsuspend If No Temp"),
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text(
-                        NSLocalizedString(
-                            "Many people occasionally forget to resume / unsuspend their pump after reconnecting it. If you’re one of them, and you are willing to reliably set a zero temp basal whenever suspending and disconnecting your pump, this feature has your back. If enabled, it will automatically resume / unsuspend the pump if you forget to do so before your zero temp expires. As long as the zero temp is still running, it will leave the pump suspended.",
-                            comment: "Unsuspend If No Temp"
-                        )
-                    )
+                    miniHint: """
+                        Automatically resume your insulin pump if you forget to unsuspend it after a zero temp basal expires
+                        Default: OFF
+                        """,
+                    verboseHint: VStack {
+                        Text("Default: OFF").bold()
+                        Text("""
+                            
+                            Many people occasionally forget to resume / unsuspend their pump after reconnecting it. If you’re one of them, and you are willing to reliably set a zero temp basal whenever suspending and disconnecting your pump, this feature has your back. If enabled, it will automatically resume / unsuspend the pump if you forget to do so before your zero temp expires. As long as the zero temp is still running, it will leave the pump suspended.
+                            
+                            """)
+                        Text("Applies only to pumps with manual suspend options").italic()
+                    }
                 )
 
                 SettingInputSection(
@@ -197,13 +248,19 @@ extension AlgorithmAdvancedSettings {
                     units: state.units,
                     type: .boolean,
                     label: NSLocalizedString("Suspend Zeros IOB", comment: "Suspend Zeros IOB"),
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text(
-                        NSLocalizedString(
-                            "Default is false. Any existing temp basals during times the pump was suspended will be deleted and 0 temp basals to negate the profile basal rates during times pump is suspended will be added.",
-                            comment: "Suspend Zeros IOB"
-                        )
-                    )
+                    miniHint: """
+                        Replaces any enacted temp basals prior to a pump suspend with a zero temp basal
+                        Default: OFF
+                        """,
+                    verboseHint: VStack {
+                        Text("Default: OFF").bold()
+                        Text("""
+                            
+                            Any existing temp basals during times the pump was suspended will be deleted and zero temp basals to negate the profile basal rates during times pump is suspended will be added.
+                            
+                            """)
+                        Text("Applies to only to pumps with manual suspend options").italic()
+                    }
                 )
 
                 SettingInputSection(
@@ -223,7 +280,7 @@ extension AlgorithmAdvancedSettings {
                     units: state.units,
                     type: .decimal("autotuneISFAdjustmentFraction"),
                     label: NSLocalizedString("Autotune ISF Adjustment Fraction", comment: "Autotune ISF Adjustment Fraction"),
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
+                    miniHint: "Using Autotune is not advised",
                     verboseHint: Text(
                         NSLocalizedString(
                             "The default of 0.5 for this value keeps autotune ISF closer to pump ISF via a weighted average of fullNewISF and pumpISF. 1.0 allows full adjustment, 0 is no adjustment from pump ISF.",
@@ -246,13 +303,21 @@ extension AlgorithmAdvancedSettings {
                     units: state.units,
                     type: .decimal("min5mCarbimpact"),
                     label: NSLocalizedString("Min 5m Carbimpact", comment: "Min 5m Carbimpact"),
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text(
-                        NSLocalizedString(
-                            "This is a setting for default carb absorption impact per 5 minutes. The default is an expected 8 mg/dL/5min. This affects how fast COB is decayed in situations when carb absorption is not visible in BG deviations. The default of 8 mg/dL/5min corresponds to a minimum carb absorption rate of 24g/hr at a CSF of 4 mg/dL/g.",
-                            comment: "Min 5m Carbimpact"
-                        )
-                    )
+                    miniHint: """
+                        Set the default rate of carb absorption when no clear impact on blood glucose is visible
+                        Default: 8 mg/dL/5min
+                        """,
+                    verboseHint: VStack {
+                        Text("Default: 8 mg/dL/5 min").bold()
+                        Text("""
+                            
+                            The Min 5m Carbimpact setting determines the default expected glucose rise (in mg/dL) over a 5-minute period from carbs when the system cannot detect clear absorption from your blood glucose levels. 
+                            
+                            The default value of 8 mg/dL per 5 minutes corresponds to an absorption rate of 24g of carbs per hour. 
+                            
+                            This setting helps the system estimate how much glucose your body is absorbing, even when it’s not immediately visible in your glucose data, ensuring more accurate insulin dosing during carb absorption.
+                            """)
+                    }
                 )
 
                 SettingInputSection(

+ 54 - 22
FreeAPS/Sources/Modules/AutosensSettings/View/AutosensSettingsRootView.swift

@@ -48,16 +48,26 @@ extension AutosensSettings {
                     units: state.units,
                     type: .decimal("autosensMax"),
                     label: NSLocalizedString("Autosens Max", comment: "Autosens Max"),
-                    miniHint:  """
+                    miniHint: """
                     The higher limit of the Autosens Ratio
-                    Default: **120%**
+                    Default: 120%
                     """,
-                    verboseHint: Text(
-                        NSLocalizedString(
-                            "Autosens Max sets the maximum Autosens Ratio used by Autosens, Dynamic ISF, Sigmoid Formula, and/or Autotune. The Autosens Ratio is used to calculate the amount of adjustment needed to basals, ISF, and CR. Increasing this value allows automatic adjustments of basal rates to be higher, ISF to be lower, and CR to be lower. This can result in more insulin given.",
-                            comment: "Autosens Max"
+                    verboseHint: VStack {
+                        Text("Default: 120%").bold()
+                        Text(
+                            """
+
+                            Autosens Max sets the maximum Autosens Ratio used by Autosens, Dynamic ISF, Sigmoid Formula, and/or Autotune.
+
+                            The Autosens Ratio is used to calculate the amount of adjustment needed to basals, ISF, and CR.
+
+                            """
                         )
-                    ),
+                        Text(
+                            "Increasing this value allows automatic adjustments of basal rates to be higher, ISF to be lower, and CR to be lower."
+                        )
+                        .italic()
+                    },
                     headerText: "Glucose Deviations Algorithm"
                 )
 
@@ -77,16 +87,24 @@ extension AutosensSettings {
                     label: NSLocalizedString("Autosens Min", comment: "Autosens Min"),
                     miniHint: """
                     The lower limit of the Autosens Ratio
-                    Default: **80%**
+                    Default: 80%
                     """,
-                    verboseHint: Text(NSLocalizedString(
-                        """
-                        Autosens Min sets the minimum Autosens Ratio used by Autosens, Dynamic ISF, Sigmoid Formula, and/or Autotune. 
-                        The Autosens Ratio is used to calculate the amount of adjustment needed to basals, ISF, and CR.
-                        Decreasing this value allows automatic adjustments of basal rates to be lower, ISF to be higher, and CR to be higher.
-                        """,
-                        comment: "Autosens Min")
-                    )
+                    verboseHint: VStack {
+                        Text("Default: 80%").bold()
+                        Text(
+                            """
+
+                            Autosens Min sets the minimum Autosens Ratio used by Autosens, Dynamic ISF, Sigmoid Formula, and/or Autotune.
+
+                            The Autosens Ratio is used to calculate the amount of adjustment needed to basals, ISF, and CR.
+
+                            """
+                        )
+                        Text(
+                            "Decreasing this value allows automatic adjustments of basal rates to be lower, ISF to be higher, and CR to be higher."
+                        )
+                        .italic()
+                    }
                 )
 
                 SettingInputSection(
@@ -103,13 +121,27 @@ extension AutosensSettings {
                     units: state.units,
                     type: .boolean,
                     label: NSLocalizedString("Rewind Resets Autosens", comment: "Rewind Resets Autosens"),
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text(
-                        NSLocalizedString(
-                            "This feature, enabled by default, resets the autosens ratio to neutral when you rewind your pump, on the assumption that this corresponds to a probable site change. Autosens will begin learning sensitivity anew from the time of the rewind, which may take up to 6 hours. If you usually rewind your pump independently of site changes, you may want to consider disabling this feature.",
-                            comment: "Rewind Resets Autosens"
+                    miniHint: """
+                    Pump rewind initiates a reset in Autosens Ratio
+                    Default: ON
+                    """,
+                    verboseHint: VStack {
+                        Text("Default: ON").bold()
+                        Text("""
+                        Medtronic Users Only
+                        """).bold().italic()
+                        Text("""
+
+                        This feature resets the Autosens Ratio to neutral when you rewind your pump on the assumption that this corresponds to a site change.
+
+                        Autosens will begin learning sensitivity anew from the time of the rewind, which may take up to 6 hours.
+
+                        """)
+                        Text(
+                            "If you usually rewind your pump independently of site changes, you may want to consider disabling this feature."
                         )
-                    )
+                        .italic()
+                    }
                 )
             }
             .sheet(isPresented: $shouldDisplayHint) {

+ 4 - 4
FreeAPS/Sources/Modules/AutotuneConfig/View/AutotuneConfigRootView.swift

@@ -70,8 +70,8 @@ extension AutotuneConfig {
                     units: state.units,
                     type: .boolean,
                     label: "Use Autotune",
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text("Autotune… bla bla bla"),
+                    miniHint: "It is not advised to use Autotune with Trio",
+                    verboseHint: Text("It is not advised to use Autotune with Trio"),
                     headerText: "Data-driven Adjustments"
                 )
 
@@ -90,8 +90,8 @@ extension AutotuneConfig {
                         units: state.units,
                         type: .boolean,
                         label: "Only Autotune Basal Insulin",
-                        miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                        verboseHint: Text("Only Autotune Basal Insulin… bla bla bla")
+                        miniHint: "Restricts Autotune adjustments to only basal settings",
+                        verboseHint: Text("Restricts Autotune adjustments to only basal settings.")
                     )
                 }
 

+ 55 - 16
FreeAPS/Sources/Modules/BolusCalculatorConfig/View/BolusCalculatorConfigRootView.swift

@@ -62,8 +62,17 @@ extension BolusCalculatorConfig {
                     units: state.units,
                     type: .boolean,
                     label: "Display Meal Presets",
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text("Lorem ipsum dolor sit amet, consetetur sadipscing elitr.")
+                    miniHint: """
+                    Enabling this feature allows you to create and save preset meals
+                    Default: OFF
+                    """,
+                    verboseHint: VStack {
+                        Text("Default: OFF").bold()
+                        Text("""
+
+                        Enabling this feature allows you to create and save preset meals.
+                        """)
+                    }
                 )
 
                 SettingInputSection(
@@ -80,8 +89,20 @@ extension BolusCalculatorConfig {
                     units: state.units,
                     type: .decimal("overrideFactor"),
                     label: "Recommended Bolus Percentage",
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text("Recommended Bolus Percentage… bla bla bla"),
+                    miniHint: """
+                    Percentage of the calculated bolus used as your recommended bolus in the bolus calculator
+                    Default: 70%
+                    """,
+                    verboseHint: VStack {
+                        Text("Default: 70%").bold()
+                        Text("""
+
+                        Recommended bolus percentage is a safety feature built into Trio. Trio first calculates an insulin required value, which is the full dosage. That dosage is then multiplied by your Recommended Bolus Percentage to display your suggested insulin dose in the bolus calculator.
+
+                        Because Trio utilizes SMBs and UAM SMBs to help you reach your target glucose, you'll want this setting to be lower than the full calculated amount (<100%).
+                        """)
+                        Text("It is not advised to set this to 100% if you also have SMBs and/or UAM SMBs enabled.").italic()
+                    },
                     headerText: "Calculator Configuration"
                 )
 
@@ -98,12 +119,21 @@ extension BolusCalculatorConfig {
                     ),
                     units: state.units,
                     type: .conditionalDecimal("fattyMealFactor"),
-                    label: "Enable Fatty Meal Factor",
-                    conditionalLabel: "Fatty Meal Factor",
-                    miniHint: "Lower your bolus recommendation by factor x for fatty meals.",
-                    verboseHint: Text(
-                        "You can add the option in your bolus calculator to apply another (!) customizable factor at the end of the calculation which could be useful for fatty meals, e.g Pizza (default 0.7)."
-                    )
+                    label: "Enable Fatty Meal",
+                    conditionalLabel: "Fatty Meal Bolus Percentage",
+                    miniHint: """
+                    Lower your bolus recommendation by this percentage for meals that digest slowly
+                    Default: 70%
+                    """,
+                    verboseHint: VStack {
+                        Text("Default: 70%").bold()
+                        Text("""
+
+                        This adjustment lowers your calculated bolus by this percentage when you select "Fatty Meal" in the bolus calculator. This setting replaces the Recommended Bolus Percentage Setting when selected.
+
+                        You want this setting to be lower than your Recommended Bolus Percentage setting to prevent lows with meals that digest slowly.
+                        """)
+                    }
                 )
 
                 SettingInputSection(
@@ -114,17 +144,26 @@ extension BolusCalculatorConfig {
                         get: { selectedVerboseHint },
                         set: {
                             selectedVerboseHint = $0.map { AnyView($0) }
-                            hintLabel = "Super Bolus & Sweet Meal Factor"
+                            hintLabel = "Super Bolus Percentage"
                         }
                     ),
                     units: state.units,
                     type: .conditionalDecimal("sweetMealFactor"),
                     label: "Enable Super Bolus",
-                    conditionalLabel: "Super Bolus Factor",
-                    miniHint: "Add x times current scheduled basal rate to your bolus recommendation.",
-                    verboseHint: Text(
-                        "You can enable the super bolus functionality which could be useful when eating sweets/cake etc. Therefore your current basal rate will be added x-times to your bolus recommendation. You can adjust the factor X here, the default is 2 times your current scheduled basal rate."
-                    )
+                    conditionalLabel: "Super Bolus Percentage",
+                    miniHint: """
+                    Raise your bolus recommendation by this percentage for meals with fast carbs
+                    Default: 200%
+                    """,
+                    verboseHint: VStack {
+                        Text("Default 200%").bold()
+                        Text("""
+
+                        This adjustment raises your calculated bolus by this percentage when you select "Super Bolus" in the bolus calculator. This setting replaces the Recommended Bolus Percentage setting when "Super Bolus" is selected. 
+
+                        You want this setting to be higher than your Recommended Bolus Percentage setting to enable the bolus calculator to give above the calculated amount to address carbs that absorb very quickly. This could be useful when eating sweets.
+                        """)
+                    }
                 )
             }
             .sheet(isPresented: $shouldDisplayHint) {

+ 26 - 6
FreeAPS/Sources/Modules/CGM/View/CGMRootView.swift

@@ -52,7 +52,7 @@ extension CGM {
 
                                 HStack(alignment: .top) {
                                     Text(
-                                        "Lorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                                        "Select your CGM"
                                     )
                                     .font(.footnote)
                                     .foregroundColor(.secondary)
@@ -64,7 +64,7 @@ extension CGM {
                                             selectedVerboseHint =
                                                 AnyView(
                                                     Text(
-                                                        "CGM Types… bla bla \n\nLorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                                                        "Dexcom G5 \n\nDexcom G6/ONE \n\nDexcom G7/ONE+ \n\nDexcom Share \n\nFreestyle Libre \n\nFreestyle Libre Demo \n\nGlucose Simulator \n\nMedtronic Enlite \n\nNightscout \n\nxDrip4iOS."
                                                     )
                                                 )
                                             shouldDisplayHint.toggle()
@@ -167,7 +167,10 @@ extension CGM {
 
                                 HStack(alignment: .top) {
                                     Text(
-                                        "Lorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                                        """
+                                        A “heartbeat” is what tells Trio to start a loop cycle. 
+                                        This is required to keep looping.
+                                        """
                                     )
                                     .font(.footnote)
                                     .foregroundColor(.secondary)
@@ -177,7 +180,11 @@ extension CGM {
                                         action: {
                                             hintLabel = "CGM Heartbeat"
                                             selectedVerboseHint =
-                                                AnyView(Text("Lorem ipsum dolor sit amet, consetetur sadipscing elitr."))
+                                                AnyView(
+                                                    Text(
+                                                        "The Heartbeat can come from either a CGM or a pump to wake up Trio when phone is locked or in the background. If CGM is on the same phone as Trio and xDrip4iOS is configured to use the same AppGroup as Trio and the heartbeat feature is turned on in xDrip4iOS, then the CGM can provide a heartbeat to wake up Trio when phone is locked or app is in the background."
+                                                    )
+                                                )
                                             shouldDisplayHint.toggle()
                                         },
                                         label: {
@@ -211,8 +218,21 @@ extension CGM {
                         units: state.units,
                         type: .boolean,
                         label: "Smooth Glucose Value",
-                        miniHint: "Smooth CGM readings using Savitzky–Golay filtering.",
-                        verboseHint: Text("Smooth Glucose Value… bla bla bla")
+                        miniHint: """
+                        Smooth CGM readings using Savitzky–Golay filtering
+                        Default: OFF
+                        """,
+                        verboseHint: VStack {
+                            Text("Default: OFF").bold()
+                            Text("""
+
+                            This filter looks at small groups of nearby readings and fits them to a simple mathematical curve (a low-degree polynomial). This process doesn’t change the overall pattern of your glucose data but helps smooth out the "noise" or irregular fluctuations that could lead to false highs or lows.
+
+                            Because your glucose readings are taken at regular intervals, the filter can use a set of pre-calculated "weights" to adjust each group of readings, making the calculations fast and efficient. It’s designed to keep the important trends in your data while minimizing those small, misleading variations, giving you a clearer sense of where your blood sugar is really headed.
+
+                            This type of filtering is useful in Trio, as it can help prevent over-corrections based on inaccurate glucose readings. This can help reduce the impact of sudden spikes or dips that might not reflect your true blood glucose levels, helping you get a more accurate picture of your trends.
+                            """)
+                        }
                     )
                 }
                 .scrollContentBackground(.hidden).background(color)

+ 41 - 6
FreeAPS/Sources/Modules/CalendarEventSettings/View/CalendarEventSettingsRootView.swift

@@ -48,8 +48,19 @@ extension CalendarEventSettings {
                     units: state.units,
                     type: .boolean,
                     label: "Create Events in Calendar",
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text("Create Calendar Events… bla bla bla"),
+                    miniHint: """
+                    When enabled, Trio creates customizable calendar events in an iCloud calendar'
+                    Default: OFF
+                    """,
+                    verboseHint: VStack {
+                        Text("Default: OFF").bold()
+                        Text("""
+
+                        When enabled, Trio will create a calendar event with every successful loop cycle. The previous calendar event will be deleted.
+
+                        You can customize this with the calendar of your choosing, emojis, and IOB/COB.
+                        """)
+                    },
                     headerText: "Diabetes Data as Calendar Event"
                 )
 
@@ -78,8 +89,23 @@ extension CalendarEventSettings {
                         units: state.units,
                         type: .boolean,
                         label: "Display Emojis as Labels",
-                        miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                        verboseHint: Text("Display Emojis as Labels… bla bla bla")
+                        miniHint: """
+                        Enable to use emojis instead of "IOB" or "COB" and to indicate in-range and out-of-range glucose readings
+                        Default: OFF
+                        """,
+                        verboseHint: VStack {
+                            Text("Default: OFF").bold()
+                            Text("""
+                            When enabled, the calendar event created will indicate whether glucose readings are in-range or out-of-range using the following color emojis:
+                            🟢: In-Range
+                            🟠: Above-Range
+                            🔴: Below-Range
+
+                            If "Display IOB and COB" is also enabled, "IOB" and "COB" will be replaced with the following emojis:
+                            💉: IOB
+                            🥨: COB
+                            """)
+                        }
                     )
 
                     SettingInputSection(
@@ -96,8 +122,17 @@ extension CalendarEventSettings {
                         units: state.units,
                         type: .boolean,
                         label: "Display IOB and COB",
-                        miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                        verboseHint: Text("Display IOB and COB… bla bla bla")
+                        miniHint: """
+                        Include IOB and COB in the calendar event created by Trio
+                        Default: OFF
+                        """,
+                        verboseHint: VStack {
+                            Text("Default: OFF").bold()
+                            Text("""
+
+                            When enabled, Trio will include the current IOB and COB values in the calendar event created.
+                            """)
+                        }
                     )
                 } else if state.useCalendar {
                     if #available(iOS 17.0, *) {

+ 147 - 21
FreeAPS/Sources/Modules/DynamicSettings/View/DynamicSettingsRootView.swift

@@ -69,10 +69,29 @@ extension DynamicSettings {
                     ),
                     units: state.units,
                     type: .boolean,
-                    label: "Activate Dynamic Sensitivity (ISF)",
-                    miniHint: "Trio calculates insulin sensitivity (ISF) each loop cycle based on current blood sugar, daily insulin use, and an adjustment factor, within set limits.",
-                    verboseHint: Text("DynamicISF"),
-                    headerText: "Dynamic Insulin Sensitivity"
+                    label: "Activate Dynamic ISF (Sensitivity)",
+                    miniHint: """
+                    When enabled, Trio adjusts your Insulin Sensitivity Factor (ISF) automatically based on blood glucose, insulin use, and an adjustment factor
+                    Default: OFF
+                    """,
+                    verboseHint: VStack {
+                        Text("Default: OFF").bold()
+                        Text("""
+
+                        Dynamic ISF allows Trio to calculate a new ISF with each loop cycle by considering your current blood glucose (BG), total daily dose (TDD) of insulin, and adjustment factor (AF). This helps tailor your insulin response more accurately in real-time. 
+
+                         Dynamic ISF calculates a Dynamic Ratio, determining how much your profile ISF will be adjusted every loop cycle, ensuring it stays within safe limits set by your Autosens Min/Max settings. It provides more precise insulin dosing by responding to changes in insulin needs throughout the day.
+                        """)
+                        Text("""
+
+                         Dynamic Ratio = profile.sens x AF x TDD x log (BG / insulinFactor + 1) / 1800
+
+                         New ISF = profile ISF / Dynamic Ratio
+
+                         insulinFactor = 120 - InsulinPeakTimeInMinutes
+                        """).italic()
+                    },
+                    headerText: "Dynamic ISF (Sensitivity)"
                 )
 
                 if state.useNewFormula {
@@ -89,9 +108,23 @@ extension DynamicSettings {
                         ),
                         units: state.units,
                         type: .boolean,
-                        label: "Activate Dynamic Carb Ratio (CR)",
-                        miniHint: "Similar to Dynamic Sensitivity, Trio calculates a dynamic carb ratio every loop cycle.",
-                        verboseHint: Text("Logarithmic Dynamic Insulin Sensitivity")
+                        label: "Activate Dynamic CR (Carb Ratio)",
+                        miniHint: """
+                        Automatically adjust your carb ratio (CR) based on insulin sensitivity and glucose levels
+                        Default: OFF
+                        """,
+                        verboseHint: VStack {
+                            Text("Default: OFF").bold()
+                            Text("""
+
+                            Dynamic CR adjusts your carb ratio in real-time, depending on your Dynamic Ratio. When this ratio increases (indicating you need more insulin), the carb ratio is adjusted to make your insulin dosing more effective. When the ratio decreases (indicating you need less insulin), the carb ratio is scaled back to avoid over-delivery.
+
+                            """)
+                            Text(
+                                "It’s recommended not to use this feature with a high Insulin Fraction (>2), as it can cause insulin dosing to become too aggressive."
+                            )
+                            .italic()
+                        }
                     )
 
                     SettingInputSection(
@@ -108,8 +141,28 @@ extension DynamicSettings {
                         units: state.units,
                         type: .boolean,
                         label: "Use Sigmoid Formula",
-                        miniHint: "Alternative formula for dynamic ISF, that alters ISF based on distance from target BG",
-                        verboseHint: Text("Sigmoid  Dynamic Insulin Sensitivity")
+                        miniHint: """
+                        Alternative formula for Dynamic ISF (Sensitivity), that adjusts ISF based on distance from target BG using a sigmoid-shaped curve
+                        Default: OFF
+                        """,
+                        verboseHint: VStack {
+                            Text("Default: OFF").bold()
+                            Text("""
+
+                            Turning on the Sigmoid Formula setting changes how your Dynamic Ratio, and thus your New ISF and New Carb Ratio, are calculated using a sigmoid curve rather than the default logarithmic function. The curve's steepness is adjusted by the Adjustment Factor (AF), while the Autosens Min/Max settings determine the limits of the ratio adjustment. 
+
+                            When using the Sigmoid Formula, TDD has a much lower impact on the dynamic adjustments to sensitivity.
+
+                            Careful tuning is essential to avoid overly aggressive insulin changes.
+
+                            """)
+                            Text("""
+                            It’s recommended to not set Autosens Max above 1.5 to maintain safe insulin dosing.
+
+                            """).italic()
+                            Text("There has been no empirical data analysis to support the use of the Sigmoid Formula.").italic()
+                                .bold()
+                        }
                     )
 
                     if !state.sigmoid {
@@ -121,14 +174,25 @@ extension DynamicSettings {
                                 get: { selectedVerboseHint },
                                 set: {
                                     selectedVerboseHint = $0.map { AnyView($0) }
-                                    hintLabel = "Adjustment Factor"
+                                    hintLabel = "Adjustment Factor (AF)"
                                 }
                             ),
                             units: state.units,
                             type: .decimal("adjustmentFactor"),
-                            label: "Adjustment Factor",
-                            miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                            verboseHint: Text("Adjustment Factor for logarithmic dynamic sensitvity... bla bla bla")
+                            label: "Adjustment Factor (AF)",
+                            miniHint: """
+                            Fine-tune how aggressively your ISF changes in response to glucose fluctuations when using Dynamic ISF (logarithmic formula)
+                            Default: 80%
+                            """,
+                            verboseHint: VStack {
+                                Text("Default: 80%").bold()
+                                Text("""
+
+                                The Adjustment Factor (AF) allows you to control how aggressively your dynamic ISF responds to changes in blood glucose levels. A higher value means a stronger correction, increasing or decreasing the sensitivity of your insulin delivery to highs and lows in your glucose readings.
+
+                                """)
+                                Text("The maximum effect of this setting is limited by the Autosens Min/Max values.").italic()
+                            }
                         )
                     } else {
                         SettingInputSection(
@@ -145,8 +209,22 @@ extension DynamicSettings {
                             units: state.units,
                             type: .decimal("adjustmentFactorSigmoid"),
                             label: "Sigmoid Adjustment Factor",
-                            miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                            verboseHint: Text("Sigmoid Adjustment Factor… should be 0.5… bla bla ba")
+                            miniHint: """
+                            Fine-tune how aggressively your ISF changes in response to glucose fluctuations when using Sigmoid Formula for Dynamic ISF
+                            Default: 50%
+                            """,
+                            verboseHint: VStack {
+                                Text("Default: 50%").bold()
+                                Text("""
+
+                                The Sigmoid Adjustment Factor (AF) allows you to control how aggressively your Dynamic ISF using the Sigmoid Formula responds to changes in blood glucose levels. Higher values lead to stronger corrections for high or low blood glucose levels, making the curve steeper. This setting allows for a more responsive system, but like other dynamic settings, its effect is capped by the Autosens Min/Max limits.
+
+                                """)
+                                Text(
+                                    "Due to how the curve is calculated when using the Sigmoid Formula, increasing this setting has a greater impact on the steepness of the curve than in the standard logarithmic Dynamic ISF calculation. Use caution when adjusting this setting."
+                                )
+                                .italic()
+                            }
                         )
                     }
 
@@ -164,8 +242,17 @@ extension DynamicSettings {
                         units: state.units,
                         type: .decimal("weightPercentage"),
                         label: "Weighted Average of TDD",
-                        miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                        verboseHint: Text("Weight of past 24 hours")
+                        miniHint: """
+                        The weight of the last 24 hours of total daily insulin dose (TDD) to calculate the Autosens Ratio used in Dynamic ISF and Dynamic CR
+                        Default: 65%
+                        """,
+                        verboseHint: VStack {
+                            Text("Default: 65%").bold()
+                            Text("""
+
+                            This setting adjusts how much weight is given to your recent total daily insulin dose (TDD) when calculating Dynamic ISF and Dynamic CR. At the default setting, 65% of the calculation is based on the last 24 hours of insulin use, with the remaining 35% considering the last 10 days of data. Setting this to 100% means only the past 24 hours will be used. A lower value smooths out these variations for more stability.
+                            """)
+                        }
                     )
 
                     SettingInputSection(
@@ -182,8 +269,31 @@ extension DynamicSettings {
                         units: state.units,
                         type: .boolean,
                         label: "Adjust Basal",
-                        miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                        verboseHint: Text("Adjust basal dynamically… bla bla")
+                        miniHint: """
+                        Replaces Autosens’s formula for adjusting basal rates, with a formula dependent on total daily dose (TDD) of insulin.
+                        Default: OFF
+                        """,
+                        verboseHint: VStack {
+                            Text("Default: OFF").bold()
+                            Text("""
+
+                            Turn this setting on to give basal adjustments more agility. Keep this setting off if your basal needs are not highly variable.
+
+                            Normally, a new basal rate is set by autosens:
+
+                            """)
+                            Text("New Basal Profile = (Current Basal Profile) x (Autosens Ratio)").italic()
+                            Text("""
+
+                            Adjust Basal replaces the standard Autosens Ratio calculation with its own Autosens Ratio calculated as such:
+
+                            """)
+                            Text("""
+                            Autosens Ratio = (Weighted Average of TDD)/(10-day Average of TDD)
+
+                            New basal profile = current basal profile * Autosens Ratio
+                            """).italic()
+                        }
                     )
 
                     SettingInputSection(
@@ -200,8 +310,24 @@ extension DynamicSettings {
                         units: state.units,
                         type: .decimal("threshold_setting"),
                         label: "Minimum Safety Threshold",
-                        miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                        verboseHint: Text("Minimum Safety Threshold… bla bla bla")
+                        miniHint: """
+                        This gives you the ability to increase the threshold in which insulin delivery stops.
+                        Default: (Set by Algorithm)
+                        """,
+                        verboseHint: VStack {
+                            Text("Default: Set by Algorithm").bold()
+                            Text("""
+
+                            Minimum Threshold Setting is determined by your set Target Glucose. This threshold automatically suspends insulin delivery if your glucose levels are forecasted to fall below this value. It’s designed to protect against hypoglycemia, particularly during sleep or other vulnerable times.
+
+                            If your glucose target is 110 mg/dL, Trio will use a safety threshold of 75 mg/dL, unless you set Minimum Safety Threshold (mg/dL) to something > 75.
+
+                            If you leave Minimum Safety Threshold at the default, then it will use the safety threshold calculated by the algorithm that depends on your target. The lower you set your target, the lower the safety threshold will get set. If you don't want to allow it to set your safety threshold below a certain value, you can raise Minimum Safety Threshold to a higher value using this setting.
+
+                            """)
+                            Text("Basal may be resumed if there's negative IOB and glucose is rising faster than the forecast.")
+                                .italic()
+                        }
                     )
                 }
             }

Разлика између датотеке није приказан због своје велике величине
+ 55 - 18
FreeAPS/Sources/Modules/GeneralSettings/View/UnitsLimitsSettingsRootView.swift


Разлика између датотеке није приказан због своје велике величине
+ 203 - 82
FreeAPS/Sources/Modules/SMBSettings/View/SMBSettingsRootView.swift


+ 77 - 43
FreeAPS/Sources/Modules/TargetBehavoir/View/TargetBehavoirRootView.swift

@@ -43,24 +43,33 @@ extension TargetBehavoir {
                         set: {
                             selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString(
-                                "High Temptarget Raises Sensitivity",
-                                comment: "High Temptarget Raises Sensitivity"
+                                "High Temp Target Raises Sensitivity",
+                                comment: "High Temp Target Raises Sensitivity"
                             )
                         }
                     ),
                     units: state.units,
                     type: .boolean,
                     label: NSLocalizedString(
-                        "High Temptarget Raises Sensitivity",
-                        comment: "High Temptarget Raises Sensitivity"
-                    ),
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text(
-                        NSLocalizedString(
-                            "Defaults to false. When set to true, raises sensitivity (lower sensitivity ratio) for temp targets set to >= 111. Synonym for exercise_mode. The higher your temp target above 110 will result in more sensitive (lower) ratios, e.g., temp target of 120 results in sensitivity ratio of 0.75, while 140 results in 0.6 (with default halfBasalTarget of 160).",
-                            comment: "High Temptarget Raises Sensitivity"
-                        )
+                        "High Temp Target Raises Sensitivity",
+                        comment: "High Temp Target Raises Sensitivity"
                     ),
+                    miniHint: """
+                        A Temp Target above 110 mg/dL increases sensitivity when glucose is above target
+                        Default: OFF
+                        """,
+                    verboseHint: VStack {
+                        Text("Exercise-mode").bold().italic()
+                        Text("Default: OFF").bold()
+                        Text("""
+                            
+                            When this feature is enabled, setting a temporary target above 110 mg/dL will decrease the Autosens Ratio used for ISF and basal adjustments, resulting in less insulin delivered overall. This scales with the temporary target set; the higher the temp target, the lower the Autosens Ratio used.
+                            
+                            If Half Basal Exercise Target is set to 160, a temp target of 120 mg/dL uses an Autosens Ratio of 0.75. A temp target of 140 mg/dL uses an Autosens Ratio of 0.6.
+                            
+                            """)
+                        Text("The effect of this can be adjusted with the Half Basal Exercise Target").italic()
+                    },
                     headerText: "Algorithmic Target Settings"
                 )
 
@@ -73,24 +82,33 @@ extension TargetBehavoir {
                         set: {
                             selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString(
-                                "Low Temptarget Lowers Sensitivity",
-                                comment: "Low Temptarget Lowers Sensitivity"
+                                "Low Temp Target Lowers Sensitivity",
+                                comment: "Low Temp Target Lowers Sensitivity"
                             )
                         }
                     ),
                     units: state.units,
                     type: .boolean,
                     label: NSLocalizedString(
-                        "Low Temptarget Lowers Sensitivity",
-                        comment: "Low Temptarget Lowers Sensitivity"
+                        "Low Temp Target Lowers Sensitivity",
+                        comment: "Low Temp Target Lowers Sensitivity"
                     ),
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text(
-                        NSLocalizedString(
-                            "Defaults to false. When set to true, can lower sensitivity (higher sensitivity ratio) for temptargets <= 99. The lower your temp target below 100 will result in less sensitive (higher) ratios, e.g., temp target of 95 results in sensitivity ratio of 1.09, while 85 results in 1.33 (with default halfBasalTarget of 160).",
-                            comment: "Low Temptarget Lowers Sensitivity"
-                        )
-                    )
+                    miniHint: """
+                        A Temp Target below 100 mg/dL decreases sensitivity when glucose is below target
+                        Default setting: OFF
+                        """,
+                    verboseHint: VStack {
+                        Text("Eating Soon Mode").bold().italic()
+                        Text("Default: OFF").bold()
+                        Text("""
+                            
+                            When this feature is enabled, setting a temporary target below 100 mg/dL will increase the autosens ratio used for ISF and basal adjustments, resulting in more insulin delivered overall. This scales with the temporary target set; the lower the temp target, the higher the autosens ratio used.
+                            
+                            If Half Basal Exercise Target is 160, a temp target of 95 mg/dL uses an autosens ratio of 1.09. A temp target of 85 mg/dL uses an autosens ratio of 1.33.
+                            
+                            """)
+                        Text("The effect of this can be adjusted with the Half Basal Exercise Target").italic()
+                    }
                 )
 
                 SettingInputSection(
@@ -107,13 +125,17 @@ extension TargetBehavoir {
                     units: state.units,
                     type: .boolean,
                     label: NSLocalizedString("Sensitivity Raises Target", comment: "Sensitivity Raises Target"),
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text(
-                        NSLocalizedString(
-                            "When true, raises BG target when autosens detects sensitivity",
-                            comment: "Sensitivity Raises Target"
-                        )
-                    )
+                    miniHint: """
+                        Trio will automatically raise your target glucose with increased sensitivity
+                        Default: OFF
+                        """,
+                    verboseHint: VStack {
+                        Text("Default: OFF").bold()
+                        Text("""
+                            
+                            Enabling this feature causes Trio to automatically increase the targeted glucose if it detects an increase in sensitivity.
+                            """)
+                    }
                 )
 
                 SettingInputSection(
@@ -130,13 +152,17 @@ extension TargetBehavoir {
                     units: state.units,
                     type: .boolean,
                     label: NSLocalizedString("Resistance Lowers Target", comment: "Resistance Lowers Target"),
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text(
-                        NSLocalizedString(
-                            "Defaults to false. When true, will lower BG target when autosens detects resistance",
-                            comment: "Resistance Lowers Target"
-                        )
-                    )
+                    miniHint: """
+                        Trio will automatically lower your target glucose when it detects resistance
+                        Default: OFF
+                        """,
+                    verboseHint: VStack {
+                        Text("Default: OFF").bold()
+                        Text("""
+                            
+                            Enabling this feature causes Trio to automatically reduce the targeted glucose if it detects a decrease in sensitivity (resistance).
+                            """)
+                    }
                 )
 
                 SettingInputSection(
@@ -153,13 +179,21 @@ extension TargetBehavoir {
                     units: state.units,
                     type: .decimal("halfBasalExerciseTarget"),
                     label: NSLocalizedString("Half Basal Exercise Target", comment: "Half Basal Exercise Target"),
-                    miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: Text(
-                        NSLocalizedString(
-                            "Set to a number, e.g. 160, which means when temp target is 160 mg/dL, run 50% basal at this level (120 = 75%; 140 = 60%). This can be adjusted, to give you more control over your exercise modes.",
-                            comment: "Half Basal Exercise Target"
-                        )
-                    )
+                    miniHint: """
+                        Sets your current basal rate to 50% when a temp target is set to this number (in mg/dL)
+                        Default: 160 mg/dL
+                        """,
+                    verboseHint: VStack {
+                        Text("Default: 160 mg/dL").bold()
+                        Text("""
+                            
+                            The Half Basal Exercise Target allows you to scale down your basal insulin during exercise or scale up your basal insulin when eating soon when a temporary glucose target is set. For example, at a temp target of 160 mg/dL, your basal is reduced to 50%, but this scales depending on the target (e.g., 75% at 120 mg/dL, 60% at 140 mg/dL).
+                            
+                            """)
+                        Text("""
+                            This setting is only utilized if the settings "Low Temp Target Lowers Sensitivity" OR "High Temp Target Raises Sensitivity" are enabled.
+                            """).italic()
+                    }
                 )
             }
             .sheet(isPresented: $shouldDisplayHint) {