improved timing

pull/976/head
DJ2LS 2025-05-05 21:12:08 +02:00
parent 258cc05f32
commit 2d7aba787d
1 changed files with 3 additions and 3 deletions

View File

@ -149,7 +149,7 @@ class P2PConnection:
return
# thats our heartbeat logic, only ISS will run it
if time.time() > self.last_data_timestamp + 10 and self.state in [States.CONNECTED, States.PAYLOAD_SENT] and self.is_ISS and not self.transmission_in_progress:
if time.time() > self.last_data_timestamp + 5 and self.state in [States.CONNECTED, States.PAYLOAD_SENT] and self.is_ISS and not self.transmission_in_progress:
print("no data within last 15s. Sending heartbeat")
if self.p2p_data_tx_queue.empty():
@ -159,10 +159,10 @@ class P2PConnection:
self.transmit_heartbeat(has_data=self.flag_has_data)
if self.state in [States.CONNECTED, States.PAYLOAD_SENT] and self.is_Master:
threading.Event().wait(3)
threading.Event().wait(0.5)
self.process_data_queue()
threading.Event().wait(0.500)
threading.Event().wait(0.100)