- add dynamic support for ADHOC wifi creds
This commit is contained in:
ZanzyTHEbar 2023-01-01 22:57:17 +00:00
parent 4d3a67baa3
commit 015af93efe
5 changed files with 10 additions and 17 deletions

View File

@ -203,9 +203,9 @@ void ProjectConfig::load()
}
/* AP Config */
this->config.ap_network.ssid = getString("apSSID", "openiris").c_str();
this->config.ap_network.password = getString("apPass", "12345678").c_str();
this->config.ap_network.channel = getUInt("apChannel", 1);
this->config.ap_network.ssid = getString("apSSID").c_str();
this->config.ap_network.password = getString("apPass").c_str();
this->config.ap_network.channel = getUInt("apChannel");
/* Camera Config */
this->config.camera.vflip = getInt("vflip", 0);

View File

@ -103,7 +103,7 @@ void WiFiHandler::setUpADHOC()
size_t passwordLen = configManager->getAPWifiConfig()->password.length();
if (ssidLen <= 0)
{
this->adhoc(WIFI_AP_SSID, 1, WIFI_AP_PASSWORD);
this->adhoc(WIFI_AP_SSID, WIFI_AP_CHANNEL, WIFI_AP_PASSWORD);
return;
}

View File

@ -1,8 +0,0 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
otadata, data, ota, , 0x2000
ota_0, app, ota_0, , 1M,
ota_1, app, ota_1, , 1M
storage, data, spiffs, , 0xF0000,
1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
3 nvs, data, nvs, 0x9000, 0x6000,
4 phy_init, data, phy, 0xf000, 0x1000,
5 otadata, data, ota, , 0x2000
6 ota_0, app, ota_0, , 1M,
7 ota_1, app, ota_1, , 1M
8 storage, data, spiffs, , 0xF0000,

View File

@ -232,10 +232,11 @@ build_flags =
-DWIFI_CHANNEL=${wifi.channel}
-DDEBUG_ESP_PORT=Serial ; set the debug port
'-DMDNS_HOSTNAME=${wifi.mDNSName}' ; Set the OTA password
'-DWIFI_SSID=${wifi.ssid}' ; Set the users wifi network name
'-DWIFI_PASSWORD=${wifi.password}' ; Set the users wifi network password
'-DWIFI_AP_SSID=${wifi.ap_ssid}' ; Set the users wifi network name
'-DWIFI_AP_PASSWORD=${wifi.ap_password}' ; Set the users wifi network password
'-DWIFI_SSID=${wifi.ssid}'
'-DWIFI_PASSWORD=${wifi.password}'
'-DWIFI_AP_SSID=${wifi.ap_ssid}'
'-DWIFI_AP_PASSWORD=${wifi.ap_password}'
'-DWIFI_AP_CHANNEL=${wifi.adhocchannel}'
-DENABLE_OTA=${ota.enableota}
-DOTA_SERVER_PORT=${ota.otaserverport}

View File

@ -1 +1 @@
v5.0.10
v6.5.10