1
0
mirror of https://github.com/craigerl/aprsd.git synced 2026-06-18 13:48:41 -04:00

fixed inconsistent driver send() declaration.

The KISS drivers aren't adhering to the protocol for
defining the send() method.  both now specify that they
return a bool.
This commit is contained in:
2026-02-18 13:49:40 -05:00
parent 202c689658
commit c99a9c919d
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -192,12 +192,15 @@ class SerialKISSDriver(KISSDriver):
self._connected = False
break
def send(self, packet: core.Packet):
def send(self, packet: core.Packet) -> bool:
"""Send an APRS packet.
Args:
packet: APRS packet to send (Packet or Message object)
Returns:
bool: True if packet was sent successfully
Raises:
Exception: If not connected or send fails
"""
+4 -1
View File
@@ -96,12 +96,15 @@ class TCPKISSDriver(KISSDriver):
else:
LOG.warning('close: socket not initialized. no reason to close.')
def send(self, packet: core.Packet):
def send(self, packet: core.Packet) -> bool:
"""Send an APRS packet.
Args:
packet: APRS packet to send (Packet or Message object)
Returns:
bool: True if packet was sent successfully
Raises:
Exception: If not connected or send fails
"""