From ce8bd943d884e8fb191e43f4a6c33ebe300cae7f Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Tue, 23 Sep 2025 06:26:35 -0500 Subject: [PATCH] feat(settings): add device telemetry toggle (#3166) Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com> --- .../radio/components/TelemetryConfigItemList.kt | 10 ++++++++++ core/strings/src/main/res/values/strings.xml | 2 ++ 2 files changed, 12 insertions(+) diff --git a/app/src/main/java/com/geeksville/mesh/ui/settings/radio/components/TelemetryConfigItemList.kt b/app/src/main/java/com/geeksville/mesh/ui/settings/radio/components/TelemetryConfigItemList.kt index 79aa3ea0d..778c7b9b4 100644 --- a/app/src/main/java/com/geeksville/mesh/ui/settings/radio/components/TelemetryConfigItemList.kt +++ b/app/src/main/java/com/geeksville/mesh/ui/settings/radio/components/TelemetryConfigItemList.kt @@ -55,6 +55,16 @@ fun TelemetryConfigScreen(navController: NavController, viewModel: RadioConfigVi ) { item { PreferenceCategory(text = stringResource(R.string.telemetry_config)) } + item { + SwitchPreference( + title = stringResource(R.string.device_telemetry_enabled), + summary = stringResource(R.string.device_telemetry_enabled_summary), + checked = formState.value.deviceTelemetryEnabled, + enabled = state.connected, + onCheckedChange = { formState.value = formState.value.copy { deviceTelemetryEnabled = it } }, + ) + } + item { EditTextPreference( title = stringResource(R.string.device_metrics_update_interval_seconds), diff --git a/core/strings/src/main/res/values/strings.xml b/core/strings/src/main/res/values/strings.xml index ecc4caeeb..63fa4e2ba 100644 --- a/core/strings/src/main/res/values/strings.xml +++ b/core/strings/src/main/res/values/strings.xml @@ -899,4 +899,6 @@ Disabling position on the primary channel allows periodic position broadcasts on the first secondary channel with the position enabled, otherwise manual position request required. Device configuration "[Remote] %1$s" + Send Device Telemetry + Enable/Disable the device telemetry module to send metrics to the mesh