From d0d853d72b1f8cb4b8f88eb9f954879730977b37 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Thu, 8 Dec 2022 18:17:01 +0100 Subject: [PATCH] make sure own ssid is always part of ssid list --- tnc/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tnc/main.py b/tnc/main.py index de60cea6..d4202094 100755 --- a/tnc/main.py +++ b/tnc/main.py @@ -323,8 +323,12 @@ if __name__ == "__main__": mycallsign = helpers.callsign_to_bytes(mycallsign) static.MYCALLSIGN = helpers.bytes_to_callsign(mycallsign) static.MYCALLSIGN_CRC = helpers.get_crc_24(static.MYCALLSIGN) - static.SSID_LIST = ARGS.ssid_list + # check if own ssid is always part of ssid list + own_ssid = int(mycallsign.split("-")[1]) + if own_ssid not in static.SSID_LIST: + static.SSID_LIST.append(own_ssid) + static.MYGRID = bytes(ARGS.mygrid, "utf-8") # check if we have an int or str as device name