feat: Add new regions and modem presets

This commit introduces several new regions and corresponding modem presets to align with recent firmware updates.

-   Adds `EU_866`, `NARROW_868`, and `HAM_US433` regions.
-   Adds new modem presets: `LITE_FAST`, `LITE_SLOW`, `NARROW_FAST`, and `NARROW_SLOW`.
-   Updates the channel calculation logic to account for channel spacing, matching the firmware's behavior.
-   Sets the default modem preset automatically when a new region is selected.
-   Updates the protobuf submodule to the latest version.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2026-01-04 18:21:38 -06:00
parent 833f1ca4fb
commit f75edf2a21
4 changed files with 80 additions and 9 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Meshtastic LLC
* Copyright (c) 2025-2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -14,7 +14,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.meshtastic.feature.settings.radio.component
import androidx.compose.foundation.text.KeyboardActions
@ -96,7 +95,16 @@ fun LoRaConfigScreen(viewModel: RadioConfigViewModel, onBack: () -> Unit) {
enabled = state.connected,
items = RegionInfo.entries.map { it.regionCode to it.description },
selectedItem = formState.value.region,
onItemSelected = { formState.value = formState.value.copy { region = it } },
onItemSelected = {
val regionInfo = RegionInfo.fromRegionCode(it)
formState.value =
formState.value.copy {
region = it
if (regionInfo != null) {
modemPreset = regionInfo.defaultPreset
}
}
},
)
HorizontalDivider()
SwitchPreference(