mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Update arq.py
This commit is contained in:
parent
afde181609
commit
401c2f4d8f
1 changed files with 2 additions and 0 deletions
2
arq.py
2
arq.py
|
@ -242,6 +242,7 @@ def transmit(data_out):
|
||||||
|
|
||||||
# ----------------------- Loop through ARQ FRAMES BUFFER with N = Numbers of frames which will be send at once
|
# ----------------------- 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):
|
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) + "]")
|
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])
|
modem.transmit(12, arqburst[n])
|
||||||
#LETS SLEEP SOME TIME FOR TX COOLDOWN --> CAN BE REMOVED LATER IF SYNC/UNSYNC OF FREEDV IS WORKING BETTER
|
#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
|
# --------------------------- START TIMER FOR WAITING FOR ACK ---> IF TIMEOUT REACHED, ACK_TIMEOUT = 1
|
||||||
static.ACK_TIMEOUT = 0
|
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 = threading.Timer(static.ACK_TIMEOUT_SECONDS * static.ARQ_TX_N_FRAMES, arq_ack_timeout)
|
||||||
timer.start()
|
timer.start()
|
||||||
logging.info("TX | WAITING FOR ACK")
|
logging.info("TX | WAITING FOR ACK")
|
||||||
|
|
Loading…
Reference in a new issue