This commit is contained in:
Pedro 2023-12-14 17:57:58 +01:00
parent a3d05f3521
commit b42c40dd78
2 changed files with 5 additions and 3 deletions

View file

@ -63,8 +63,9 @@ class ARQSessionIRS(arq_session.ARQSession):
def transmit_and_wait(self, frame, timeout):
self.transmit_frame(frame)
self.log(f"Waiting {timeout} seconds...")
if not self.event_frame_received.wait(timeout):
self.log("Timeout waiting for ISS to say something")
self.log("Timeout waiting for ISS. Session failed.")
self.set_state(self.STATE_FAILED)
def launch_transmit_and_wait(self, frame, timeout):

View file

@ -58,9 +58,10 @@ class ARQSessionISS(arq_session.ARQSession):
else: burst = [frame_or_burst]
for f in burst:
self.transmit_frame(f)
self.log(f"Waiting {timeout} seconds...")
if self.event_frame_received.wait(timeout):
break
self.log("Timeout...")
return
self.log("Timeout!")
retries = retries - 1
self.set_state(self.STATE_FAILED)
self.log("Session failed")