feature: default rf channel : Make setup page use mesh defaults on reset or unconfigured

When a node is first setup (unconfigured) the rf channel or when user presses reset button the wifi channel and bandwidth will be set to mesh default even if it does not match the current RF channel.
This commit is contained in:
Conrad Lara - KG6JEI 2015-05-13 21:47:15 -07:00
parent 99bd244753
commit c11eae61e8
1 changed files with 8 additions and 0 deletions

View File

@ -530,6 +530,14 @@ else
} }
if($wifi_proto ne "disabled") if($wifi_proto ne "disabled")
{ {
# Reset wifi channel/bandwidth to default
if ( -f "/etc/config/unconfigured" || $parms{button_reset} ) {
my $defaultwifi = rf_default_channel();
$wifi_channel = $defaultwifi->{'channel'};
$wifi_chanbw = $defaultwifi->{'chanbw'};
}
print "<tr><td>SSID</td>\n"; print "<tr><td>SSID</td>\n";
print "<td><input type=text size=15 name=wifi_ssid value='$wifi_ssid'>"; print "<td><input type=text size=15 name=wifi_ssid value='$wifi_ssid'>";
if ($config eq "mesh") if ($config eq "mesh")