mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor config get and set methods
This commit is contained in:
parent
346a50a360
commit
fd0c8ef9b8
4 changed files with 72 additions and 118 deletions
|
|
@ -493,10 +493,8 @@ class MeshService : Service(), Logging {
|
|||
setChannel(it)
|
||||
}
|
||||
|
||||
val newConfig = ConfigProtos.Config.newBuilder()
|
||||
val newPrefs = (value.loraConfig).toBuilder()
|
||||
newConfig.lora = newPrefs.build()
|
||||
if (localConfig.lora != newConfig.lora) sendDeviceConfig(newConfig.build())
|
||||
val newConfig = config { lora = value.loraConfig }
|
||||
if (localConfig.lora != newConfig.lora) sendDeviceConfig(newConfig)
|
||||
|
||||
channels = fixupChannelList(asChannels)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue