Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
758b4ebf
Unverified
Commit
758b4ebf
authored
May 03, 2023
by
David McCurley
Committed by
GitHub
May 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eraseAP (#8148)
parent
5c92a023
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
libraries/WiFi/src/WiFiSTA.cpp
libraries/WiFi/src/WiFiSTA.cpp
+16
-0
libraries/WiFi/src/WiFiSTA.h
libraries/WiFi/src/WiFiSTA.h
+1
-0
No files found.
libraries/WiFi/src/WiFiSTA.cpp
View file @
758b4ebf
...
@@ -366,6 +366,22 @@ bool WiFiSTAClass::disconnect(bool wifioff, bool eraseap)
...
@@ -366,6 +366,22 @@ bool WiFiSTAClass::disconnect(bool wifioff, bool eraseap)
return
false
;
return
false
;
}
}
/**
* @brief Reset WiFi settings in NVS to default values.
* @return true if erase succeeded
* @note: Resets SSID, password, protocol, mode, etc.
* These settings are maintained by WiFi driver in IDF.
* WiFi driver must be initialized.
*/
bool
WiFiSTAClass
::
eraseAP
(
void
)
{
if
(
WiFi
.
getMode
()
==
WIFI_MODE_NULL
)
{
if
(
!
WiFi
.
enableSTA
(
true
))
return
false
;
}
return
esp_wifi_restore
()
==
ESP_OK
;
}
/**
/**
* Change IP configuration settings disabling the dhcp client
* Change IP configuration settings disabling the dhcp client
* @param local_ip Static ip configuration
* @param local_ip Static ip configuration
...
...
libraries/WiFi/src/WiFiSTA.h
View file @
758b4ebf
...
@@ -53,6 +53,7 @@ public:
...
@@ -53,6 +53,7 @@ public:
bool
reconnect
();
bool
reconnect
();
bool
disconnect
(
bool
wifioff
=
false
,
bool
eraseap
=
false
);
bool
disconnect
(
bool
wifioff
=
false
,
bool
eraseap
=
false
);
bool
eraseAP
(
void
);
bool
isConnected
();
bool
isConnected
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment