mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
attempt avoiding connecting while already connected
This commit is contained in:
parent
4ddfe52db9
commit
2cb7ee7893
1 changed files with 17 additions and 0 deletions
|
@ -1622,6 +1622,15 @@ class DATA:
|
||||||
if not static.RESPOND_TO_CALL:
|
if not static.RESPOND_TO_CALL:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
# ignore channel opener if already in ARQ STATE
|
||||||
|
# use case: Station A is connecting to Station B while
|
||||||
|
# Station B already tries connecting to Station A.
|
||||||
|
# For avoiding ignoring repeated connect request in case of packet loss
|
||||||
|
# we are only ignoring packets in case we are ISS
|
||||||
|
if static.ARQ_SESSION and not self.IS_ARQ_SESSION_MASTER:
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
self.IS_ARQ_SESSION_MASTER = False
|
self.IS_ARQ_SESSION_MASTER = False
|
||||||
static.ARQ_SESSION_STATE = "connecting"
|
static.ARQ_SESSION_STATE = "connecting"
|
||||||
|
|
||||||
|
@ -2043,6 +2052,14 @@ class DATA:
|
||||||
# check if callsign ssid override
|
# check if callsign ssid override
|
||||||
_, self.mycallsign = helpers.check_callsign(self.mycallsign, data_in[1:4])
|
_, self.mycallsign = helpers.check_callsign(self.mycallsign, data_in[1:4])
|
||||||
|
|
||||||
|
# ignore channel opener if already in ARQ STATE
|
||||||
|
# use case: Station A is connecting to Station B while
|
||||||
|
# Station B already tries connecting to Station A.
|
||||||
|
# For avoiding ignoring repeated connect request in case of packet loss
|
||||||
|
# we are only ignoring packets in case we are ISS
|
||||||
|
if static.ARQ_STATE and not self.is_IRS:
|
||||||
|
return False
|
||||||
|
|
||||||
static.DXCALLSIGN_CRC = bytes(data_in[4:7])
|
static.DXCALLSIGN_CRC = bytes(data_in[4:7])
|
||||||
self.dxcallsign = helpers.bytes_to_callsign(bytes(data_in[7:13]))
|
self.dxcallsign = helpers.bytes_to_callsign(bytes(data_in[7:13]))
|
||||||
static.DXCALLSIGN = self.dxcallsign
|
static.DXCALLSIGN = self.dxcallsign
|
||||||
|
|
Loading…
Reference in a new issue