improved helpers

This commit is contained in:
DJ2LS 2021-02-10 15:04:18 +01:00 committed by GitHub
parent 91114d0db2
commit cebaf469db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,10 +30,42 @@ def get_crc_16(data):
def arq_ack_timeout(): def arq_ack_timeout():
if static.ARQ_STATE == 'RECEIVING_SIGNALLING':
static.ARQ_RX_ACK_TIMEOUT = True static.ARQ_RX_ACK_TIMEOUT = True
#print("ARQ_RX_ACK_TIMEOUT") print("ARQ_RX_ACK_TIMEOUT")
def arq_rpt_timeout(): def arq_rpt_timeout():
if static.ARQ_STATE == 'RECEIVING_SIGNALLING':
static.ARQ_RX_RPT_TIMEOUT = True static.ARQ_RX_RPT_TIMEOUT = True
#print("ARQ_RX_RPT_TIMEOUT") print("ARQ_RX_RPT_TIMEOUT")
def arq_frame_timeout():
if static.ARQ_STATE == 'RECEIVING_SIGNALLING':
static.ARQ_RX_FRAME_TIMEOUT = True
print("ARQ_RX_FRAME_TIMEOUT")
def arq_reset_timeout(state):
print(state)
static.ARQ_RX_ACK_TIMEOUT = state
static.ARQ_RX_FRAME_TIMEOUT = state
static.ARQ_RX_RPT_TIMEOUT = state
def arq_reset_ack(state):
print(state)
static.ARQ_ACK_RECEIVED = state
static.ARQ_RPT_RECEIVED = state
static.ARQ_FRAME_ACK_RECEIVED = state
def arq_reset_frame_machine():
arq_reset_timeout(False)
arq_reset_ack(False)
static.TX_N_RETRIES = 0
static.ARQ_N_SENT_FRAMES = 0
static.ARQ_TX_N_FRAMES_PER_BURST = 0