Explorar el Código

Extend chart legend w/ extra info for glucose smoothing

Deniz Cengiz hace 1 año
padre
commit
1dff9eab14
Se han modificado 1 ficheros con 18 adiciones y 4 borrados
  1. 18 4
      FreeAPS/Sources/Modules/Home/View/Chart/ChartLegendView.swift

+ 18 - 4
FreeAPS/Sources/Modules/Home/View/Chart/ChartLegendView.swift

@@ -66,15 +66,29 @@ struct ChartLegendView: View {
                         DefinitionRow(
                             term: "CGM Glucose Value",
                             definition: VStack(alignment: .leading, spacing: 10) {
-                                Text(
-                                    "Displays real-time glucose readings from your CGM. Depending on your user interface settings, this may be displayed in a static (red, green, orange) or dynamic (full color spectrum) coloring scheme."
-                                )
+                                if state.settingsManager.settings.smoothGlucose {
+                                    Text(
+                                        "Displays real-time glucose readings from your CGM that were smoothed using the Savatzky-Golay filter. The displayed glucose readings may not match the actual readings from your CGM."
+                                    )
+                                    Text(
+                                        "Depending on your user interface settings, this may be displayed in a static (red, green, orange) or dynamic (full color spectrum) coloring scheme."
+                                    )
+                                } else {
+                                    Text(
+                                        "Displays real-time glucose readings from your CGM. Depending on your user interface settings, this may be displayed in a static (red, green, orange) or dynamic (full color spectrum) coloring scheme."
+                                    )
+                                }
                                 Text(
                                     "To modify how glucose readings are displayed, go to Settings > Features > User Interface > Glucose Color Scheme."
                                 )
+                                if state.settingsManager.settings.smoothGlucose {
+                                    Text(
+                                        "To disable smoothing, go to Settings > Devices > Continuous Glucose Monitor > Smooth Glucose Value and toggle off the setting."
+                                    )
+                                }
                             },
                             color: Color.green,
-                            iconString: !state.settingsManager.settings.smoothGlucose ? "circle.fill" : "record.circle.fill"
+                            iconString: state.settingsManager.settings.smoothGlucose ? "record.circle.fill" : "circle.fill"
                         )
 
                         DefinitionRow(