Unverified Commit dbab62c2 authored by Richard Teel's avatar Richard Teel Committed by GitHub

Added clearAPList method to WiFiMulti (#1848)

Fixes #1846
parent 6a878cde
......@@ -58,6 +58,15 @@ bool WiFiMulti::addAP(const char *ssid, const char *pass) {
return true;
}
void WiFiMulti::clearAPList() {
while (!_list.empty()) {
struct _AP ap = _list.front();
_list.pop_front();
free(ap.ssid);
free(ap.pass);
}
}
uint8_t WiFiMulti::run(uint32_t to) {
struct _scanAP {
char *ssid;
......
......@@ -32,6 +32,8 @@ public:
bool addAP(const char *ssid, const char *pass = nullptr);
void clearAPList();
uint8_t run(uint32_t to = 10000);
private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment