mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
first version overriding own callsign ssid
This commit is contained in:
parent
564f4c106e
commit
cf4b3bf9cd
1 changed files with 10 additions and 4 deletions
14
tnc/sock.py
14
tnc/sock.py
|
@ -351,6 +351,15 @@ def process_tnc_commands(data):
|
||||||
|
|
||||||
dxcallsign = received_json["dxcallsign"]
|
dxcallsign = received_json["dxcallsign"]
|
||||||
|
|
||||||
|
# check if specific callsign is set with different SSID than the TNC is initialized
|
||||||
|
try:
|
||||||
|
mycallsign = received_json["parameter"][0]["mycallsign"]
|
||||||
|
mycallsign = helpers.callsign_to_bytes(mycallsign)
|
||||||
|
mycallsign = helpers.bytes_to_callsign(mycallsign)
|
||||||
|
|
||||||
|
except Exception:
|
||||||
|
mycallsign = static.MYCALLSIGN
|
||||||
|
|
||||||
# additional step for being sure our callsign is correctly
|
# additional step for being sure our callsign is correctly
|
||||||
# in case we are not getting a station ssid
|
# in case we are not getting a station ssid
|
||||||
# then we are forcing a station ssid = 0
|
# then we are forcing a station ssid = 0
|
||||||
|
@ -370,10 +379,8 @@ def process_tnc_commands(data):
|
||||||
|
|
||||||
# try connecting
|
# try connecting
|
||||||
try:
|
try:
|
||||||
static.DXCALLSIGN = dxcallsign
|
|
||||||
static.DXCALLSIGN_CRC = helpers.get_crc_24(static.DXCALLSIGN)
|
|
||||||
|
|
||||||
DATA_QUEUE_TRANSMIT.put(["CONNECT", dxcallsign, attempts])
|
DATA_QUEUE_TRANSMIT.put(["CONNECT", mycallsign, dxcallsign, attempts])
|
||||||
command_response("connect", True)
|
command_response("connect", True)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
command_response("connect", False)
|
command_response("connect", False)
|
||||||
|
@ -385,7 +392,6 @@ def process_tnc_commands(data):
|
||||||
# allow beacon transmission again
|
# allow beacon transmission again
|
||||||
static.BEACON_PAUSE = False
|
static.BEACON_PAUSE = False
|
||||||
|
|
||||||
|
|
||||||
# allow beacon transmission again
|
# allow beacon transmission again
|
||||||
static.BEACON_PAUSE = False
|
static.BEACON_PAUSE = False
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue