mirror of
https://github.com/agessaman/meshcore-packet-capture.git
synced 2026-04-20 23:23:37 +00:00
Preserve decoded advert metadata
This commit is contained in:
parent
1e78f4ce32
commit
400a5dc4c0
1 changed files with 1 additions and 9 deletions
|
|
@ -276,9 +276,6 @@ class PacketCapture:
|
|||
self.rf_data_cache = {}
|
||||
self.packet_count = 0
|
||||
|
||||
# Opted-in IDs for advert filtering (mirroring mctomqtt.py)
|
||||
self.opted_in_ids = []
|
||||
|
||||
# Device information
|
||||
self.device_name = None
|
||||
self.device_public_key = None
|
||||
|
|
@ -2683,12 +2680,7 @@ class PacketCapture:
|
|||
payload_value = self.parse_advert(payload)
|
||||
|
||||
if payload_type is PayloadType.ADVERT:
|
||||
key_prefix = payload_value["public_key"][:2]
|
||||
name = payload_value.get("name", "")
|
||||
if name.endswith("^"):
|
||||
message.update(payload_value)
|
||||
elif key_prefix not in self.opted_in_ids:
|
||||
self.opted_in_ids.append(key_prefix)
|
||||
message.update(payload_value)
|
||||
else:
|
||||
message.update(payload_value)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue