Update arq.py

This commit is contained in:
DJ2LS 2021-01-20 15:03:42 +01:00 committed by GitHub
parent afde181609
commit 401c2f4d8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

2
arq.py
View file

@ -242,6 +242,7 @@ def transmit(data_out):
# ----------------------- Loop through ARQ FRAMES BUFFER with N = Numbers of frames which will be send at once
for n in range(static.ARQ_TX_N_FRAMES):
static.ARQ_STATE = 'SENDING_DATA'
logging.info("TX | SENDING BURST [" + str(n+1) + " / " + str(static.ARQ_TX_N_FRAMES) + "] [" + str(static.ARQ_N_SENT_FRAMES + n+1) + " / " + str(static.TX_BUFFER_SIZE) + "] [" + str(burst_payload_crc) + "]")
modem.transmit(12, arqburst[n])
#LETS SLEEP SOME TIME FOR TX COOLDOWN --> CAN BE REMOVED LATER IF SYNC/UNSYNC OF FREEDV IS WORKING BETTER
@ -249,6 +250,7 @@ def transmit(data_out):
# --------------------------- START TIMER FOR WAITING FOR ACK ---> IF TIMEOUT REACHED, ACK_TIMEOUT = 1
static.ACK_TIMEOUT = 0
static.ARQ_STATE = 'RECEIVING_ACK'
timer = threading.Timer(static.ACK_TIMEOUT_SECONDS * static.ARQ_TX_N_FRAMES, arq_ack_timeout)
timer.start()
logging.info("TX | WAITING FOR ACK")