attempt of sending in previous speed level

This commit is contained in:
DJ2LS 2024-02-23 13:55:15 +01:00
parent 7ecccabcc0
commit f307ed779f

View file

@ -76,7 +76,6 @@ class ARQSessionISS(arq_session.ARQSession):
if len(self.state_manager.arq_iss_sessions) >= 255: if len(self.state_manager.arq_iss_sessions) >= 255:
return False return False
def transmit_wait_and_retry(self, frame_or_burst, timeout, retries, mode): def transmit_wait_and_retry(self, frame_or_burst, timeout, retries, mode):
while retries > 0: while retries > 0:
self.event_frame_received = threading.Event() self.event_frame_received = threading.Event()
@ -91,6 +90,14 @@ class ARQSessionISS(arq_session.ARQSession):
self.log("Timeout!") self.log("Timeout!")
retries = retries - 1 retries = retries - 1
# TODO TEMPORARY TEST FOR SENDING IN LOWER SPEED LEVEL IF WE HAVE TWO FAILED TRANSMISSIONS!!!
if retries == 8:
self.log("SENDING IN LOWER SPEED LEVEL at", isWarning=True)
if self.speed_level > 0:
self.speed_level -= 1
self.send_data({'flag':{'ABORT': False, 'FINAL': False}, 'speed_level': self.speed_level})
return
self.set_state(ISS_State.FAILED) self.set_state(ISS_State.FAILED)
self.transmission_failed() self.transmission_failed()