Merge pull request #97 from meshtastic/feature/lora_config

Finish Position Config
This commit is contained in:
Garth Vander Houwen 2022-06-21 13:41:55 -07:00 committed by GitHub
commit 38d915fada
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 2 deletions

View file

@ -95,6 +95,7 @@ struct DeviceConfig: View {
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
}
}
.disabled(bleManager.connectedPeripheral == nil)
HStack {

View file

@ -180,6 +180,7 @@ struct DisplayConfig: View {
.listRowSeparator(.visible)
}
}
.disabled(bleManager.connectedPeripheral == nil)
Button {

View file

@ -236,6 +236,7 @@ struct LoRaConfig: View {
.listRowSeparator(.visible)
}
}
.disabled(bleManager.connectedPeripheral == nil)
Button {

View file

@ -184,7 +184,6 @@ struct PositionConfig: View {
}
}
.disabled(!(node.myInfo?.hasGps ?? true))
Section(header: Text("Position Packet")) {
@ -226,7 +225,6 @@ struct PositionConfig: View {
Label("Number of satellites", systemImage: "skew")
}
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
.disabled(!(node.myInfo?.hasGps ?? true))
.listRowSeparator(.visible)
Toggle(isOn: $includePosSeqNos) { //64
@ -258,6 +256,7 @@ struct PositionConfig: View {
.listRowSeparator(.visible)
}
}
.disabled(bleManager.connectedPeripheral == nil)
Button {

View file

@ -47,6 +47,10 @@ struct Settings: View {
Section("Radio Configuration") {
Text("Radio config values will be be enabled when there is a connected node. Save buttons will enable when there is a connected node and config changes to save.")
.font(.caption)
.listRowSeparator(.visible)
NavigationLink {
DeviceConfig(node: nodes.first(where: { $0.num == connectedNodeNum }) ?? NodeInfoEntity())
} label: {