mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Mostly complete lora config
This commit is contained in:
parent
cc8b906075
commit
b93ec723f1
1 changed files with 6 additions and 5 deletions
|
|
@ -188,7 +188,6 @@ struct LoRaConfig: View {
|
|||
var node: NodeInfoEntity
|
||||
|
||||
@State private var isPresentingSaveConfirm: Bool = false
|
||||
@State var loadCount = 0
|
||||
@State var region = 0
|
||||
@State var modemPreset = 0
|
||||
@State var hopLimit = 0
|
||||
|
|
@ -282,17 +281,19 @@ struct LoRaConfig: View {
|
|||
.onAppear {
|
||||
|
||||
self.bleManager.context = context
|
||||
if loadCount == 0 {
|
||||
|
||||
}
|
||||
.task {
|
||||
do {
|
||||
print("got hops \(node.loRaConfig?.hopLimit ?? 0)")
|
||||
self.hopLimit = Int(node.loRaConfig?.hopLimit ?? 0)
|
||||
self.region = Int(node.loRaConfig?.regionCode ?? 0)
|
||||
self.modemPreset = Int(node.loRaConfig?.modemPreset ?? 0)
|
||||
self.hasChanges = false
|
||||
} catch {
|
||||
print("Failed to load node data")
|
||||
}
|
||||
loadCount+=1
|
||||
}
|
||||
.onChange(of: region) { newModemPreset in
|
||||
.onChange(of: region) { newRegion in
|
||||
|
||||
hasChanges = true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue