mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
remove channel from networkSettings
This commit is contained in:
@@ -78,9 +78,9 @@ void NetworkSettingsService::manageSTA() {
|
||||
for (uint8_t i = 0; i < 6; i++) {
|
||||
mac1[i] = (uint8_t)mac[i];
|
||||
}
|
||||
WiFi.begin(_state.ssid.c_str(), _state.password.c_str(), _state.channel, mac1);
|
||||
WiFi.begin(_state.ssid.c_str(), _state.password.c_str(), 0, mac1);
|
||||
} else {
|
||||
WiFi.begin(_state.ssid.c_str(), _state.password.c_str(), _state.channel);
|
||||
WiFi.begin(_state.ssid.c_str(), _state.password.c_str());
|
||||
}
|
||||
|
||||
// set power after wifi is startet, fixed value for C3_V1
|
||||
|
||||
@@ -30,19 +30,18 @@
|
||||
class NetworkSettings {
|
||||
public:
|
||||
// core wifi configuration
|
||||
String ssid;
|
||||
String bssid;
|
||||
String password;
|
||||
String hostname;
|
||||
uint8_t channel;
|
||||
bool staticIPConfig;
|
||||
bool enableIPv6;
|
||||
bool bandwidth20;
|
||||
int8_t tx_power;
|
||||
bool nosleep;
|
||||
bool enableMDNS;
|
||||
bool enableCORS;
|
||||
String CORSOrigin;
|
||||
String ssid;
|
||||
String bssid;
|
||||
String password;
|
||||
String hostname;
|
||||
bool staticIPConfig;
|
||||
bool enableIPv6;
|
||||
bool bandwidth20;
|
||||
int8_t tx_power;
|
||||
bool nosleep;
|
||||
bool enableMDNS;
|
||||
bool enableCORS;
|
||||
String CORSOrigin;
|
||||
|
||||
// optional configuration for static IP address
|
||||
IPAddress localIP;
|
||||
@@ -55,7 +54,6 @@ class NetworkSettings {
|
||||
// connection settings
|
||||
root["ssid"] = settings.ssid;
|
||||
root["bssid"] = settings.bssid;
|
||||
root["channel"] = settings.channel;
|
||||
root["password"] = settings.password;
|
||||
root["hostname"] = settings.hostname;
|
||||
root["static_ip_config"] = settings.staticIPConfig;
|
||||
@@ -80,7 +78,6 @@ class NetworkSettings {
|
||||
auto CORSOrigin = settings.CORSOrigin;
|
||||
settings.ssid = root["ssid"] | FACTORY_WIFI_SSID;
|
||||
settings.bssid = root["bssid"] | "";
|
||||
settings.channel = root["channel"] | 0;
|
||||
settings.password = root["password"] | FACTORY_WIFI_PASSWORD;
|
||||
settings.hostname = root["hostname"] | FACTORY_WIFI_HOSTNAME;
|
||||
settings.staticIPConfig = root["static_ip_config"] | false;
|
||||
|
||||
Reference in New Issue
Block a user