arq session fixes

This commit is contained in:
dj2ls 2023-01-11 16:18:29 +01:00
parent 32b181b3b0
commit 4904c5e7df
2 changed files with 5 additions and 2 deletions

View file

@ -584,6 +584,7 @@ class DATA:
self.enqueue_frame_for_tx([nack_frame], c2_mode=FREEDV_MODE.sig1.value, copies=1, repeat_delay=0)
# reset burst timeout in case we had to wait too long
self.burst_last_received = time.time()
def send_disconnect_frame(self) -> None:
"""Build and send a disconnect frame"""
disconnection_frame = bytearray(self.length_sig1_frame)
@ -2890,7 +2891,7 @@ class DATA:
self.log.debug("[TNC] arq_cleanup")
self.session_id = bytes(1)
self.rx_frame_bof_received = False
self.rx_frame_eof_received = False
self.burst_ack = False
@ -2929,10 +2930,12 @@ class DATA:
self.session_connect_max_retries = 10
self.data_channel_max_retries = 10
# we need to keep these values if in ARQ_SESSION
if not static.ARQ_SESSION:
static.TNC_STATE = "IDLE"
self.dxcallsign = b"AA0AA-0"
self.mycallsign = static.MYCALLSIGN
self.session_id = bytes(1)
static.ARQ_STATE = False
self.arq_file_transfer = False

View file

@ -136,7 +136,7 @@ class ThreadedTCPRequestHandler(socketserver.StreamRequestHandler):
# we might improve this by only processing one command or
# doing some kind of selection to determin which commands need to be dropped
# and which one can be processed during a running transmission
threading.Event().wait(3)
threading.Event().wait(0.5)
# finally delete our rx buffer to be ready for new commands
data = bytes()