mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Handle default hop limit
This commit is contained in:
parent
0c9acee6d6
commit
9faead1d6a
2 changed files with 4 additions and 4 deletions
|
|
@ -106,7 +106,7 @@ struct DeviceMetricsLog: View {
|
|||
Text("\(String(format: "%.2f", dm.voltage))")
|
||||
}
|
||||
TableColumn("channel.utilization") { dm in
|
||||
Text(String(format: "%.2f", dm.channelUtilization))
|
||||
Text("\(String(format: "%.2f", dm.channelUtilization))%")
|
||||
}
|
||||
TableColumn("airtime") { dm in
|
||||
Text("\(String(format: "%.2f", dm.airUtilTx))%")
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ struct LoRaConfig: View {
|
|||
@State var hasChanges = false
|
||||
@State var region: Int = 0
|
||||
@State var modemPreset = 0
|
||||
@State var hopLimit = 0
|
||||
@State var hopLimit = 3
|
||||
@State var txPower = 0
|
||||
@State var txEnabled = true
|
||||
@State var usePreset = true
|
||||
|
|
@ -140,7 +140,7 @@ struct LoRaConfig: View {
|
|||
Picker("Number of hops", selection: $hopLimit) {
|
||||
ForEach(1..<8) {
|
||||
Text("\($0)")
|
||||
.tag($0 == 3 ? 0 : $0)
|
||||
.tag($0 == 0 ? 3 : $0)
|
||||
}
|
||||
}
|
||||
.pickerStyle(DefaultPickerStyle())
|
||||
|
|
@ -284,7 +284,7 @@ struct LoRaConfig: View {
|
|||
}
|
||||
}
|
||||
func setLoRaValues() {
|
||||
self.hopLimit = Int(node?.loRaConfig?.hopLimit ?? 0)
|
||||
self.hopLimit = Int(node?.loRaConfig?.hopLimit ?? 3)
|
||||
self.region = Int(node?.loRaConfig?.regionCode ?? 0)
|
||||
self.usePreset = node?.loRaConfig?.usePreset ?? true
|
||||
self.modemPreset = Int(node?.loRaConfig?.modemPreset ?? 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue