Fix for setting web AP channel (#1388)

* Deleted wifi channel set without effect

* When initializing wifi, use actual channel from settings instead of always using channel 1
This commit is contained in:
Ignatius Tremor 2021-01-24 23:36:33 +01:00 committed by GitHub
parent 535d2d3f95
commit fe06b87dc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View File

@ -125,9 +125,6 @@ void setup() {
// create scan.json
scan.setup();
// set channel
setWifiChannel(settings::getWifiSettings().channel, true);
// dis/enable serial command interface
if (settings::getCLISettings().enabled) {
cli.enable();
@ -196,4 +193,4 @@ void loop() {
led::setMode(LED_MODE::IDLE);
displayUI.mode = _mode;
}
}
}

View File

@ -192,7 +192,7 @@ namespace wifi {
setPath("/web");
setSSID(settings::getAccessPointSettings().ssid);
setPassword(settings::getAccessPointSettings().password);
setChannel(1);
setChannel(settings::getWifiSettings().channel);
setHidden(settings::getAccessPointSettings().hidden);
setCaptivePortal(settings::getWebSettings().captive_portal);
@ -462,4 +462,4 @@ namespace wifi {
dns.processNextRequest();
}
}
}
}