make sure own ssid is always part of ssid list

This commit is contained in:
DJ2LS 2022-12-08 18:44:29 +01:00
parent d0d853d72b
commit 9dcf0959b4
2 changed files with 8 additions and 3 deletions

View file

@ -252,8 +252,13 @@ class DAEMON:
if data[25] == "True":
options.append("--explorer")
options.append("--ssid_list")
options.append(data[26])
# wen want our ssid like this: --ssid 1 2 3 4
ssid_list = ""
for i in data[26]:
ssid_list += str(i) + " "
options.append("--ssid")
options.append(ssid_list)
# safe data to config file
config.write_entire_config(data)

View file

@ -325,7 +325,7 @@ if __name__ == "__main__":
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])
own_ssid = int(mycallsign.split(b"-")[1])
if own_ssid not in static.SSID_LIST:
static.SSID_LIST.append(own_ssid)