mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
improved open data channel
This commit is contained in:
parent
7b59bcdf81
commit
b7f3bf7eff
2 changed files with 9 additions and 4 deletions
|
@ -501,8 +501,8 @@ async def arq_open_data_channel():
|
|||
connection_frame[12:13] = bytes([static.ARQ_DATA_CHANNEL_MODE])
|
||||
|
||||
while not static.ARQ_READY_FOR_DATA:
|
||||
for attempt in range(0,3):
|
||||
logging.info("DATA [" + str(static.MYCALLSIGN, 'utf-8') + "]>> <<[" + str(static.DXCALLSIGN, 'utf-8') + "] A:[" + str(attempt + 1) + "/" + str(3) + "]")
|
||||
for attempt in range(0,static.ARQ_OPEN_DATA_CHANNEL_RETRIES):
|
||||
logging.info("DATA [" + str(static.MYCALLSIGN, 'utf-8') + "]>> <<[" + str(static.DXCALLSIGN, 'utf-8') + "] A:[" + str(attempt + 1) + "/" + str(static.ARQ_OPEN_DATA_CHANNEL_RETRIES) + "]")
|
||||
modem.transmit_signalling(connection_frame)
|
||||
while static.CHANNEL_STATE == 'SENDING_SIGNALLING':
|
||||
time.sleep(0.01)
|
||||
|
@ -513,7 +513,11 @@ async def arq_open_data_channel():
|
|||
if static.ARQ_READY_FOR_DATA:
|
||||
break
|
||||
if static.ARQ_READY_FOR_DATA:
|
||||
break
|
||||
break
|
||||
|
||||
if not static.ARQ_READY_FOR_DATA and attempt + 1 == static.ARQ_OPEN_DATA_CHANNEL_RETRIES:
|
||||
logging.info("DATA [" + str(static.MYCALLSIGN, 'utf-8') + "]>>X<<[" + str(static.DXCALLSIGN, 'utf-8') + "]")
|
||||
sys.exit()
|
||||
|
||||
|
||||
def arq_received_data_channel_opener(data_in):
|
||||
|
|
|
@ -79,7 +79,7 @@ AUDIO_RMS = 0
|
|||
# ---------------------------------
|
||||
|
||||
# ARQ DEFAULTS
|
||||
TX_N_MAX_RETRIES = 2
|
||||
TX_N_MAX_RETRIES = 3
|
||||
TX_N_RETRIES = 0
|
||||
|
||||
ARQ_TX_N_FRAMES_PER_BURST = 0
|
||||
|
@ -150,6 +150,7 @@ CHANNEL_STATE = 'RECEIVING_SIGNALLING'
|
|||
TNC_STATE = 'IDLE'
|
||||
|
||||
# MODE FOR SENDING AN RECEIVING DATA DURING ARQ SESSION
|
||||
ARQ_OPEN_DATA_CHANNEL_RETRIES = 3
|
||||
ARQ_READY_FOR_DATA = False
|
||||
ARQ_DATA_CHANNEL_MODE = 0
|
||||
ARQ_DATA_CHANNEL_LAST_RECEIVED = 0
|
||||
|
|
Loading…
Reference in a new issue