From 75bda136b8714ad6cbcd4f24071f6b635df4efed Mon Sep 17 00:00:00 2001 From: DJ2LS Date: Mon, 29 Apr 2024 11:55:33 +0200 Subject: [PATCH] reduced connection attempts, resend message only if snr > -2dB --- freedata_server/arq_session_iss.py | 2 +- freedata_server/frame_handler_beacon.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/freedata_server/arq_session_iss.py b/freedata_server/arq_session_iss.py index 1c82b590..c0965201 100644 --- a/freedata_server/arq_session_iss.py +++ b/freedata_server/arq_session_iss.py @@ -20,7 +20,7 @@ class ISS_State(Enum): class ARQSessionISS(arq_session.ARQSession): - RETRIES_CONNECT = 10 + RETRIES_CONNECT = 5 # DJ2LS: 3 seconds seems to be too small for radios with a too slow PTT toggle time # DJ2LS: 3.5 seconds is working well WITHOUT a channel busy detection delay diff --git a/freedata_server/frame_handler_beacon.py b/freedata_server/frame_handler_beacon.py index 10b79822..daa901d5 100644 --- a/freedata_server/frame_handler_beacon.py +++ b/freedata_server/frame_handler_beacon.py @@ -17,6 +17,8 @@ class BeaconFrameHandler(frame_handler.FrameHandler): self.details['frame']["gridsquare"] ) - if self.config["MESSAGES"]["enable_auto_repeat"]: + # only check for queued messages, if we have enabled this and if we have a minimum snr received + print(self.details["snr"]) + if self.config["MESSAGES"]["enable_auto_repeat"] and self.details["snr"] >= -2: # set message to queued if beacon received DatabaseManagerMessages(self.event_manager).set_message_to_queued_for_callsign(self.details['frame']["origin"])