From be11f5ed68db970cbb84f1fccb288e218f6b67b9 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sat, 1 Dec 2018 11:32:18 +0100 Subject: [PATCH] AX.25 TX delay --- RNS/Interfaces/AX25KISSInterface.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RNS/Interfaces/AX25KISSInterface.py b/RNS/Interfaces/AX25KISSInterface.py index d118b01..9217b4f 100644 --- a/RNS/Interfaces/AX25KISSInterface.py +++ b/RNS/Interfaces/AX25KISSInterface.py @@ -56,6 +56,7 @@ class AX25KISSInterface(Interface): self.stopbits = stopbits self.timeout = 100 self.online = False + self.txdelay = 0.4 self.packet_queue = [] self.flow_control = flow_control @@ -214,6 +215,10 @@ class AX25KISSInterface(Interface): data = data.replace(chr(0xc0), chr(0xdb)+chr(0xdc)) kiss_frame = chr(0xc0)+chr(0x00)+data+chr(0xc0) + if (self.txdelay > 0): + RNS.log(str(self.name)+" delaying TX for "+str(self.txdelay)+" seconds", RNS.LOG_EXTREME) + sleep(self.txdelay) + written = self.serial.write(kiss_frame) if written != len(kiss_frame): if self.flow_control: