Skip to content

Commit

Permalink
Merge pull request esp8266#1230 from martinayotte/master
Browse files Browse the repository at this point in the history
add show_hidden argument to scanNetworks()
  • Loading branch information
Links2004 committed Dec 16, 2015
2 parents 246ed7a + 481d74b commit e75c3d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions libraries/ESP8266WiFi/src/ESP8266WiFi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ void ESP8266WiFiClass::scanDelete()
_scanComplete = false;
}

int8_t ESP8266WiFiClass::scanNetworks(bool async)
int8_t ESP8266WiFiClass::scanNetworks(bool async, bool show_hidden)
{
if(ESP8266WiFiClass::_scanStarted) {
return WIFI_SCAN_RUNNING;
Expand Down Expand Up @@ -589,7 +589,7 @@ int8_t ESP8266WiFiClass::scanNetworks(bool async)
config.ssid = 0;
config.bssid = 0;
config.channel = 0;
config.show_hidden = 0;
config.show_hidden = show_hidden;
if(wifi_station_scan(&config, reinterpret_cast<scan_done_cb_t>(&ESP8266WiFiClass::_scanDone))) {
ESP8266WiFiClass::_scanComplete = false;
ESP8266WiFiClass::_scanStarted = true;
Expand Down
2 changes: 1 addition & 1 deletion libraries/ESP8266WiFi/src/ESP8266WiFi.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class ESP8266WiFiClass
*
* return: Number of discovered networks
*/
int8_t scanNetworks(bool async = false);
int8_t scanNetworks(bool async = false, bool show_hidden = false);

/*
* Return the SSID discovered during the network scan.
Expand Down

0 comments on commit e75c3d8

Please sign in to comment.