Skip to content

Commit 4ab89d0

Browse files
patrickelectricdevyte
authored andcommitted
ESP8266WiFiMulti: Add count function (#3073)
Return total number of AP added Signed-off-by: Patrick José Pereira <[email protected]>
1 parent a2d16f3 commit 4ab89d0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

libraries/ESP8266WiFi/src/ESP8266WiFiMulti.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ bool ESP8266WiFiMulti::addAP(const char* ssid, const char *passphrase) {
3838
return APlistAdd(ssid, passphrase);
3939
}
4040

41+
int ESP8266WiFiMulti::count(void) {
42+
return APlist.size();
43+
}
44+
4145
wl_status_t ESP8266WiFiMulti::run(void) {
4246

4347
wl_status_t status = WiFi.status();

libraries/ESP8266WiFi/src/ESP8266WiFiMulti.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ESP8266WiFiMulti {
5353
~ESP8266WiFiMulti();
5454

5555
bool addAP(const char* ssid, const char *passphrase = NULL);
56-
56+
int count(void);
5757
wl_status_t run(void);
5858

5959
private:

0 commit comments

Comments
 (0)