mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-15 15:41:21 +10:00
Merge branch 'development' of https://github.com/tzapu/WiFiManager into development
This commit is contained in:
+3
-1
@@ -800,10 +800,12 @@ bool WiFiManager::wifiConnectDefault(){
|
||||
* @return bool success
|
||||
*/
|
||||
bool WiFiManager::setSTAConfig(){
|
||||
DEBUG_WM(F("STA static IP:"),_sta_static_ip);
|
||||
bool ret = true;
|
||||
if (_sta_static_ip) {
|
||||
DEBUG_WM(DEBUG_VERBOSE,F("Custom static IP/GW/Subnet/DNS"));
|
||||
if(_sta_static_dns) {
|
||||
DEBUG_WM(DEBUG_VERBOSE,F("Custom STA IP/GW/Subnet/DNS"));
|
||||
DEBUG_WM(DEBUG_VERBOSE,F("Custom static DNS"));
|
||||
ret = WiFi.config(_sta_static_ip, _sta_static_gw, _sta_static_sn, _sta_static_dns);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -125,7 +125,6 @@ class WiFiManagerParameter {
|
||||
void setValue(const char *defaultValue, int length);
|
||||
|
||||
protected:
|
||||
void init(const char *id, const char *label, const char *defaultValue, int length, const char *custom);
|
||||
void init(const char *id, const char *label, const char *defaultValue, int length, const char *custom, int labelPlacement);
|
||||
|
||||
private:
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
Serial.begin(115200);
|
||||
|
||||
// WiFi.mode(WiFi_STA); // it is a good practice to make sure your code sets wifi mode how you want it.
|
||||
|
||||
//WiFiManager, Local intialization. Once its business is done, there is no need to keep it around
|
||||
WiFiManager wm;
|
||||
|
||||
|
||||
//reset settings - wipe credentials for testing
|
||||
//wm.resetSettings();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user