Skip to content

Commit 4127270

Browse files
committed
Rename AP methods
1 parent d8d2f09 commit 4127270

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

libraries/WiFi/src/AP.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ bool APClass::end(){
200200
return true;
201201
}
202202

203-
bool APClass::enable(const char* ssid, const char* passphrase, int channel, int ssid_hidden, int max_connection, bool ftm_responder){
203+
bool APClass::create(const char* ssid, const char* passphrase, int channel, int ssid_hidden, int max_connection, bool ftm_responder){
204204
if(!ssid || *ssid == 0) {
205205
// fail SSID missing
206206
log_e("SSID missing!");
@@ -251,7 +251,7 @@ bool APClass::enable(const char* ssid, const char* passphrase, int channel, int
251251
return true;
252252
}
253253

254-
bool APClass::disable(){
254+
bool APClass::clear(){
255255
if(!begin()) {
256256
return false;
257257
}

libraries/WiFi/src/WiFiAP.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
*/
5050
bool WiFiAPClass::softAP(const char* ssid, const char* passphrase, int channel, int ssid_hidden, int max_connection, bool ftm_responder)
5151
{
52-
return AP.begin() && AP.enable(ssid, passphrase, channel, ssid_hidden, max_connection, ftm_responder);
52+
return AP.begin() && AP.create(ssid, passphrase, channel, ssid_hidden, max_connection, ftm_responder);
5353
}
5454

5555
/**
@@ -79,7 +79,7 @@ bool WiFiAPClass::softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress
7979
*/
8080
bool WiFiAPClass::softAPdisconnect(bool wifioff)
8181
{
82-
if(!AP.disable()){
82+
if(!AP.clear()){
8383
return false;
8484
}
8585
if(wifioff) {

libraries/WiFi/src/WiFiAP.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ class APClass: public ESP_Network_Interface {
4343
bool begin();
4444
bool end();
4545

46-
bool enable(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4, bool ftm_responder = false);
47-
bool disable();
46+
bool create(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4, bool ftm_responder = false);
47+
bool clear();
4848

4949
bool bandwidth(wifi_bandwidth_t bandwidth);
5050

0 commit comments

Comments
 (0)