feat #1688: Add UDP mesh toggle (#1689)

Adds a toggle to enable or disable mesh via UDP.
This commit is contained in:
James Rich authored and GitHub committed 2025-03-18 18:44:39 -05:00
1 parent 6720764ed4
commit 451be0b98c
2 files changed
+20

No files matched your search

@@ -276,6 +276,24 @@ fun NetworkConfigItemList(
networkInput = networkInput.copy { ipv4Config = ipv4 }
})
}
item { Divider() }
item {
PreferenceCategory(text = stringResource(R.string.udp_config))
}
item {
SwitchPreference(
title = stringResource(R.string.mesh_via_udp_enabled),
checked = networkInput.enabledProtocols == 1,
enabled = enabled,
onCheckedChange = {
networkInput =
networkInput.copy { if (it) enabledProtocols = 1 else enabledProtocols = 0 }
})
}
item { Divider() }
item {
PreferenceFooter(
+2
View File
@@ -341,4 +341,6 @@
<string name="meshtastic_low_battery_notifications">Low battery notifications</string>
<string name="low_battery_title">Low battery: %s</string>
<string name="meshtastic_low_battery_temporary_remote_notifications">Low battery notifications (favorite nodes)</string>
<string name="mesh_via_udp_enabled">Mesh via UDP enabled</string>
<string name="udp_config">UDP Config</string>
</resources>