Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions libraries/ESP8266WiFi/src/ESP8266WiFiAP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ static bool softap_config_equal(const softap_config& lhs, const softap_config& r
if(lhs.ssid_hidden != rhs.ssid_hidden) {
return false;
}
if(lhs.max_connection != rhs.max_connection) {
return false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check indentation of this line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected

}
return true;
}

Expand All @@ -81,7 +84,7 @@ static bool softap_config_equal(const softap_config& lhs, const softap_config& r
* @param channel WiFi channel number, 1 - 13.
* @param ssid_hidden Network cloaking (0 = broadcast SSID, 1 = hide SSID)
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function comment block needs to be updated to include new argument

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

included

bool ESP8266WiFiAPClass::softAP(const char* ssid, const char* passphrase, int channel, int ssid_hidden) {
bool ESP8266WiFiAPClass::softAP(const char* ssid, const char* passphrase, int channel, int ssid_hidden, int max_connection) {

if(!WiFi.enableAP(true)) {
// enable AP failed
Expand All @@ -108,7 +111,7 @@ bool ESP8266WiFiAPClass::softAP(const char* ssid, const char* passphrase, int ch
conf.channel = channel;
conf.ssid_len = strlen(ssid);
conf.ssid_hidden = ssid_hidden;
conf.max_connection = 4;
conf.max_connection = max_connection;
conf.beacon_interval = 100;

if(!passphrase || strlen(passphrase) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion libraries/ESP8266WiFi/src/ESP8266WiFiAP.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ESP8266WiFiAPClass {

public:

bool softAP(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0);
bool softAP(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4);
bool softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet);
bool softAPdisconnect(bool wifioff = false);

Expand Down