Replaced sleep with helpers.wait in transmit_qrv.

This commit is contained in:
Paul Kronenwetter 2022-04-15 19:59:12 -04:00
parent 9f9b5e98e2
commit 62b939fbc9

View file

@ -1686,9 +1686,8 @@ class DATA():
# Sleep a random amount of time before responding to make it more likely to be # Sleep a random amount of time before responding to make it more likely to be
# heard when many stations respond. Each DATAC0 frame is 0.44 sec (440ms) in # heard when many stations respond. Each DATAC0 frame is 0.44 sec (440ms) in
# duration, plus overhead. Set the wait interval to be random between 0 and 2s # duration, plus overhead. Set the wait interval to be random between 0 and 2s
# in 0.5s increments. If the maximum time is "too long,"" the user may believe the # in 0.5s increments.
# UI / TNC has frozen because this sleep blocks all other activity. helpers.wait(randrange(0, 20, 5) / 10.0)
time.sleep(randrange(0, 20, 5) / 10.0)
static.INFO.append("QRV;SENDING") static.INFO.append("QRV;SENDING")
structlog.get_logger("structlog").info("[TNC] Sending QRV!") structlog.get_logger("structlog").info("[TNC] Sending QRV!")