mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Check for connected node num when packets come in from the radio
This commit is contained in:
parent
1bb19bbc20
commit
20384e4899
2 changed files with 8 additions and 2 deletions
|
|
@ -877,7 +877,13 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
|
|||
case .waypointApp:
|
||||
waypointPacket(packet: decodedInfo.packet, context: context)
|
||||
case .nodeinfoApp:
|
||||
if !invalidVersion { upsertNodeInfoPacket(packet: decodedInfo.packet, context: context) }
|
||||
guard let peripheral = self.connectedPeripheral else {
|
||||
Logger.mesh.error("🕸️ connectedPeripheral is nil. Unable to determine connectedNodeNum for node info upsert.")
|
||||
return
|
||||
}
|
||||
if Int64(truncatingIfNeeded: decodedInfo.packet.from) != peripheral.num {
|
||||
upsertNodeInfoPacket(packet: decodedInfo.packet, context: context)
|
||||
}
|
||||
case .routingApp:
|
||||
if !invalidVersion {
|
||||
guard let peripheral = self.connectedPeripheral else {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 27fac39141d99fe727a0a1824c5397409b1aea75
|
||||
Subproject commit e2c0831aa3d34a58a36c2b9fdcb828e58961cbc5
|
||||
Loading…
Add table
Add a link
Reference in a new issue