1
0
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:
Walter Boring 2025-09-26 11:55:40 -04:00
parent 8cd61a72c8
commit 3961e1d1ad

View File

@ -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