mirror of
https://github.com/craigerl/aprsd.git
synced 2026-01-17 11:05:37 -05:00
Added ThirdPartyPacket decoding in tcpkiss driver
This patch adds a check in the tcpkiss driver to check to see if the packet is a 3rd party packet and automatically return the subpacket if it is.
This commit is contained in:
parent
8cd61a72c8
commit
3961e1d1ad
@ -248,7 +248,11 @@ class TCPKISSDriver:
|
||||
LOG.warning(f'FRAME: {str(frame)}')
|
||||
try:
|
||||
aprslib_frame = aprslib.parse(str(frame))
|
||||
return core.factory(aprslib_frame)
|
||||
packet = core.factory(aprslib_frame)
|
||||
if isinstance(packet, core.ThirdPartyPacket):
|
||||
return packet.subpacket
|
||||
else:
|
||||
return packet
|
||||
except Exception as e:
|
||||
LOG.error(f'Error decoding packet: {e}')
|
||||
return None
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user