adjusted search range for rx buffer

This commit is contained in:
DJ2LS 2022-12-12 10:06:45 +01:00
parent 19bcde01b0
commit 2cdea7eaa9
2 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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()