mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
ARQ WIP
This commit is contained in:
parent
a3d05f3521
commit
b42c40dd78
2 changed files with 5 additions and 3 deletions
|
@ -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):
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue