From 2cdea7eaa9ef6cfe0baf74bdeb93adb1863e551e Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Mon, 12 Dec 2022 10:06:45 +0100 Subject: [PATCH] adjusted search range for rx buffer --- tnc/data_handler.py | 4 ++-- tnc/modem.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tnc/data_handler.py b/tnc/data_handler.py index d5da4c20..78d7489b 100644 --- a/tnc/data_handler.py +++ b/tnc/data_handler.py @@ -647,7 +647,7 @@ class DATA: # static.RX_FRAME_BUFFER --> existing data # temp_burst_buffer --> new data # search_area --> area where we want to search - search_area = 510 + search_area = 510 - 3 # (3 bytes arq frame header) search_position = len(static.RX_FRAME_BUFFER) - search_area # find position of data. returns -1 if nothing found in area else >= 0 @@ -1906,7 +1906,7 @@ class DATA: self.enqueue_frame_for_tx([connection_frame], c2_mode=FREEDV_MODE.datac0.value, copies=1, repeat_delay=0) - timeout = time.time() + 4 + timeout = time.time() + 3 while time.time() < timeout: time.sleep(0.01) # Stop waiting if data channel is opened diff --git a/tnc/modem.py b/tnc/modem.py index a7f99adf..10031344 100644 --- a/tnc/modem.py +++ b/tnc/modem.py @@ -1067,6 +1067,8 @@ def get_modem_error_state(): get current state buffer and return True of contains 10 """ + # TODO: actually disabled for debugging purposes + return False if RECEIVE_DATAC1 and 10 in DAT0_DATAC1_STATE: DAT0_DATAC1_STATE.clear()