Fix path for KISS clients

The kiss client send method was always forcing the config
path.  If a packet has a path specified in it, that will
override the config setting for the kiss client setting in the config.
This commit is contained in:
Hemna 2023-10-05 18:00:45 -04:00
parent f41488b48a
commit 746eeb81b0
1 changed files with 4 additions and 4 deletions

View File

@ -91,12 +91,12 @@ class KISS3Client:
"""Send an APRS Message object."""
payload = None
self.path
path = self.path
if isinstance(packet, core.Packet):
packet.prepare()
payload = packet.payload.encode("US-ASCII")
if packet.path:
packet.path
path = packet.path
else:
msg_payload = f"{packet.raw}{{{str(packet.msgNo)}"
payload = (
@ -108,12 +108,12 @@ class KISS3Client:
LOG.debug(
f"KISS Send '{payload}' TO '{packet.to_call}' From "
f"'{packet.from_call}' with PATH '{self.path}'",
f"'{packet.from_call}' with PATH '{path}'",
)
frame = Frame.ui(
destination="APZ100",
source=packet.from_call,
path=self.path,
path=path,
info=payload,
)
self.kiss.write(frame)