mirror of
https://github.com/craigerl/aprsd.git
synced 2025-07-30 12:22:27 -04:00
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:
parent
f41488b48a
commit
746eeb81b0
@ -91,12 +91,12 @@ class KISS3Client:
|
|||||||
"""Send an APRS Message object."""
|
"""Send an APRS Message object."""
|
||||||
|
|
||||||
payload = None
|
payload = None
|
||||||
self.path
|
path = self.path
|
||||||
if isinstance(packet, core.Packet):
|
if isinstance(packet, core.Packet):
|
||||||
packet.prepare()
|
packet.prepare()
|
||||||
payload = packet.payload.encode("US-ASCII")
|
payload = packet.payload.encode("US-ASCII")
|
||||||
if packet.path:
|
if packet.path:
|
||||||
packet.path
|
path = packet.path
|
||||||
else:
|
else:
|
||||||
msg_payload = f"{packet.raw}{{{str(packet.msgNo)}"
|
msg_payload = f"{packet.raw}{{{str(packet.msgNo)}"
|
||||||
payload = (
|
payload = (
|
||||||
@ -108,12 +108,12 @@ class KISS3Client:
|
|||||||
|
|
||||||
LOG.debug(
|
LOG.debug(
|
||||||
f"KISS Send '{payload}' TO '{packet.to_call}' From "
|
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(
|
frame = Frame.ui(
|
||||||
destination="APZ100",
|
destination="APZ100",
|
||||||
source=packet.from_call,
|
source=packet.from_call,
|
||||||
path=self.path,
|
path=path,
|
||||||
info=payload,
|
info=payload,
|
||||||
)
|
)
|
||||||
self.kiss.write(frame)
|
self.kiss.write(frame)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user