diff --git a/Localizable.xcstrings b/Localizable.xcstrings index 811fbdd2..f1806ddf 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -16445,6 +16445,9 @@ }, "Pin B" : { + }, + "PKI based node administration, requires firmware version 2.5+" : { + }, "Please connect to a radio to configure settings." : { @@ -18930,6 +18933,9 @@ }, "Security Config" : { + }, + "Security Config Settings require a firmware version 2.5+" : { + }, "Select a channel" : { diff --git a/Meshtastic/Persistence/UpdateCoreData.swift b/Meshtastic/Persistence/UpdateCoreData.swift index 93ba6493..7c43448b 100644 --- a/Meshtastic/Persistence/UpdateCoreData.swift +++ b/Meshtastic/Persistence/UpdateCoreData.swift @@ -384,12 +384,7 @@ func upsertPositionPacket (packet: MeshPacket, context: NSManagedObjectContext) } } } else { - - if (try? NodeInfo(serializedData: packet.decoded.payload)) != nil { - upsertNodeInfoPacket(packet: packet, context: context) - } else { - Logger.data.error("💥 Empty POSITION_APP Packet: \((try? packet.jsonString()) ?? "JSON Decode Failure", privacy: .public)") - } + Logger.data.error("💥 Empty POSITION_APP Packet: \((try? packet.jsonString()) ?? "JSON Decode Failure", privacy: .public)") } } } catch { diff --git a/Meshtastic/Views/Messages/ChannelMessageList.swift b/Meshtastic/Views/Messages/ChannelMessageList.swift index 74a4538a..91a922c9 100644 --- a/Meshtastic/Views/Messages/ChannelMessageList.swift +++ b/Meshtastic/Views/Messages/ChannelMessageList.swift @@ -94,7 +94,11 @@ struct ChannelMessageList: View { Text("Waiting to be acknowledged. . .").font( .caption2) .foregroundColor(.orange) - } else if isDetectionSensorMessage { + } else if currentUser && !isDetectionSensorMessage { + Text("\(ackErrorVal?.display ?? "Empty Ack Error")").fixedSize(horizontal: false, vertical: true) + .foregroundStyle(ackErrorVal?.color ?? Color.red) + .font(.caption2) + } else { let messageDate = message.timestamp Text(" \(messageDate.formattedDate(format: MessageText.dateFormatString))").font(.caption2).foregroundColor(.gray) } diff --git a/Meshtastic/Views/Messages/UserList.swift b/Meshtastic/Views/Messages/UserList.swift index cb3582ab..bf953d5b 100644 --- a/Meshtastic/Views/Messages/UserList.swift +++ b/Meshtastic/Views/Messages/UserList.swift @@ -227,7 +227,7 @@ struct UserList: View { .onChange(of: maxDistance) { _ in searchUserList() } - .onFirstAppear { + .onAppear { searchUserList() } .safeAreaInset(edge: .bottom, alignment: .leading) { diff --git a/Meshtastic/Views/Nodes/Helpers/Map/PositionPopover.swift b/Meshtastic/Views/Nodes/Helpers/Map/PositionPopover.swift index 6a717629..3f0a528b 100644 --- a/Meshtastic/Views/Nodes/Helpers/Map/PositionPopover.swift +++ b/Meshtastic/Views/Nodes/Helpers/Map/PositionPopover.swift @@ -232,7 +232,9 @@ struct PositionPopover: View { } BatteryGauge(node: position.nodePosition!) } - LoRaSignalStrengthMeter(snr: position.nodePosition?.snr ?? 0.0, rssi: position.nodePosition?.rssi ?? 0, preset: ModemPresets(rawValue: UserDefaults.modemPreset) ?? ModemPresets.longFast, compact: false) + if position.nodePosition?.hopsAway ?? 0 == 0 && !(position.nodePosition?.viaMqtt ?? false) { + LoRaSignalStrengthMeter(snr: position.nodePosition?.snr ?? 0.0, rssi: position.nodePosition?.rssi ?? 0, preset: ModemPresets(rawValue: UserDefaults.modemPreset) ?? ModemPresets.longFast, compact: false) + } Spacer() } } diff --git a/Meshtastic/Views/Nodes/Helpers/NodeListFilter.swift b/Meshtastic/Views/Nodes/Helpers/NodeListFilter.swift index 66d88b28..210e58d1 100644 --- a/Meshtastic/Views/Nodes/Helpers/NodeListFilter.swift +++ b/Meshtastic/Views/Nodes/Helpers/NodeListFilter.swift @@ -91,18 +91,18 @@ struct NodeListFilter: View { .toggleStyle(SwitchToggleStyle(tint: .accentColor)) .listRowSeparator(.visible) - Toggle(isOn: $isEnvironment) { - - Label { - Text("Environment") - } icon: { - Image(systemName: "cloud.sun") - .symbolRenderingMode(.multicolor) + if filterTitle == "Node Filters" { + Toggle(isOn: $isEnvironment) { + Label { + Text("Environment") + } icon: { + Image(systemName: "cloud.sun") + .symbolRenderingMode(.multicolor) + } } + .toggleStyle(SwitchToggleStyle(tint: .accentColor)) + .listRowSeparator(.visible) } - .toggleStyle(SwitchToggleStyle(tint: .accentColor)) - .listRowSeparator(.visible) - Toggle(isOn: $distanceFilter) { Label { diff --git a/Meshtastic/Views/Nodes/NodeList.swift b/Meshtastic/Views/Nodes/NodeList.swift index e252aa95..67636328 100644 --- a/Meshtastic/Views/Nodes/NodeList.swift +++ b/Meshtastic/Views/Nodes/NodeList.swift @@ -344,7 +344,7 @@ struct NodeList: View { self.selectedNode = nil } } - .onFirstAppear { + .onAppear { Task { await searchNodeList() } diff --git a/Meshtastic/Views/Settings/AppSettings.swift b/Meshtastic/Views/Settings/AppSettings.swift index ef3bc384..02286655 100644 --- a/Meshtastic/Views/Settings/AppSettings.swift +++ b/Meshtastic/Views/Settings/AppSettings.swift @@ -28,6 +28,9 @@ struct AppSettings: View { Label("Administration", systemImage: "gearshape.2") } .toggleStyle(SwitchToggleStyle(tint: .accentColor)) + Text("PKI based node administration, requires firmware version 2.5+") + .foregroundStyle(.secondary) + .font(.caption) } Section(header: Text("environment")) { VStack(alignment: .leading) { diff --git a/Meshtastic/Views/Settings/Channels.swift b/Meshtastic/Views/Settings/Channels.swift index bec86958..ce48b658 100644 --- a/Meshtastic/Views/Settings/Channels.swift +++ b/Meshtastic/Views/Settings/Channels.swift @@ -146,7 +146,7 @@ struct Channels: View { ChannelForm(channelIndex: $channelIndex, channelName: $channelName, channelKeySize: $channelKeySize, channelKey: $channelKey, channelRole: $channelRole, uplink: $uplink, downlink: $downlink, positionPrecision: $positionPrecision, preciseLocation: $preciseLocation, positionsEnabled: $positionsEnabled, hasChanges: $hasChanges, hasValidKey: $hasValidKey, supportedVersion: $supportedVersion) .presentationDetents([.large]) .presentationDragIndicator(.visible) - .onAppear { + .onFirstAppear { supportedVersion = bleManager.connectedVersion == "0.0.0" || self.minimumVersion.compare(bleManager.connectedVersion, options: .numeric) == .orderedAscending || minimumVersion.compare(bleManager.connectedVersion, options: .numeric) == .orderedSame } HStack { diff --git a/Meshtastic/Views/Settings/Config/SecurityConfig.swift b/Meshtastic/Views/Settings/Config/SecurityConfig.swift index 597324e0..e07ed945 100644 --- a/Meshtastic/Views/Settings/Config/SecurityConfig.swift +++ b/Meshtastic/Views/Settings/Config/SecurityConfig.swift @@ -37,7 +37,8 @@ struct SecurityConfig: View { VStack { Form { ConfigHeader(title: "Security", config: \.securityConfig, node: node, onAppear: setSecurityValues) - + Text("Security Config Settings require a firmware version 2.5+") + .font(.title3) Section(header: Text("Admin & Direct Message Keys")) { VStack(alignment: .leading) { Label("Public Key", systemImage: "key")