From e284ff98e298c1ff0b3da0ebca0e0f2be4239558 Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Tue, 21 Feb 2023 15:25:18 -0800 Subject: [PATCH] Move the unconfigued setup earlier Fixes bad band label display on first boot --- files/www/cgi-bin/setup | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/files/www/cgi-bin/setup b/files/www/cgi-bin/setup index 68327dec..0cb50c2a 100755 --- a/files/www/cgi-bin/setup +++ b/files/www/cgi-bin/setup @@ -1053,6 +1053,13 @@ html.print([[
]]) +-- reset wifi channel/bandwidth to default +if nixio.fs.stat("/etc/config/unconfigured") or parms.button_reset then + local defaultwifi = aredn.hardware.get_default_channel() + wifi_channel = defaultwifi.channel + wifi_chanbw = tostring(defaultwifi.bandwidth) +end + -- mesh rf settings html.print("") html.print("") @@ -1067,13 +1074,6 @@ end html.print(">") html.print("") --- reset wifi channel/bandwidth to default -if nixio.fs.stat("/etc/config/unconfigured") or parms.button_reset then - local defaultwifi = aredn.hardware.get_default_channel() - wifi_channel = defaultwifi.channel - wifi_chanbw = tostring(defaultwifi.bandwidth) -end - if wifi_enable == "1" then html.print("") hidden[#hidden + 1] = ""
Mesh RF (" .. (M3model and "3GHz" or M9model and "900MHz" or wifi_channel < 36 and "2GHz" or "5GHz") .. ")
IP Address
Netmask
SSID-" .. wifi_chanbw .. "-v3