change ModemPreset and don't reset LoRaConfig

This commit is contained in:
andrekir
2022-10-13 18:20:51 -03:00
parent 003da7c37a
commit f310bb2019

View File

@@ -313,12 +313,12 @@ class ChannelFragment : ScreenFragment("Channel"), Logging {
}
// No matter what apply the speed selection from the user
val newLoRaConfig = loRaConfig {
val newLoRaConfig = model.config.lora.copy {
usePreset = true
modemPreset = newModemPreset
region = model.region
txEnabled = model.txEnabled
txPower = model.config.lora.txPower
bandwidth = 0
spreadFactor = 0
codingRate = 0
}
val humanName = Channel(newSettings, newLoRaConfig).humanName