diff --git a/app/src/main/java/com/geeksville/mesh/ui/components/config/NeighborInfoConfigItemList.kt b/app/src/main/java/com/geeksville/mesh/ui/components/config/NeighborInfoConfigItemList.kt index e50492122..ba67b0b2c 100644 --- a/app/src/main/java/com/geeksville/mesh/ui/components/config/NeighborInfoConfigItemList.kt +++ b/app/src/main/java/com/geeksville/mesh/ui/components/config/NeighborInfoConfigItemList.kt @@ -11,10 +11,12 @@ import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalFocusManager +import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.geeksville.mesh.ModuleConfigProtos +import com.geeksville.mesh.R import com.geeksville.mesh.copy import com.geeksville.mesh.model.RadioConfigViewModel import com.geeksville.mesh.moduleConfig @@ -80,6 +82,19 @@ fun NeighborInfoConfigItemList( }) } + item { + SwitchPreference( + title = "Transmit over LoRa", + summary = stringResource(id = R.string.config_device_transmitOverLora_summary), + checked = neighborInfoInput.transmitOverLora, + enabled = enabled, + onCheckedChange = { + neighborInfoInput = neighborInfoInput.copy { transmitOverLora = it } + } + ) + Divider() + } + item { PreferenceFooter( enabled = enabled && neighborInfoInput != neighborInfoConfig, diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index db9380fcb..77528d736 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -67,6 +67,7 @@ Treat double tap on supported accelerometers as a user button press. Disables the triple-press of user button to enable or disable GPS. Controls the blinking LED on the device. For most devices this will control one of the up to 4 LEDs, the charger and GPS LEDs are not controllable. + Whether in addition to sending it to MQTT and the PhoneAPI, our NeighborInfo should be transmitted over LoRa. Not available on a channel with default key and name. MSL ChUtil %.1f%% AirUtilTX %.1f%%