Skip to content

Commit 06e2b05

Browse files
committed
Update AP.cpp
1 parent 90c3696 commit 06e2b05

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

Diff for: libraries/WiFi/src/AP.cpp

-29
Original file line numberDiff line numberDiff line change
@@ -185,28 +185,10 @@ bool APClass::onDisable(){
185185
}
186186

187187
bool APClass::begin(){
188-
189-
// Network.begin();
190-
// if(_ap_ev_instance == NULL && esp_event_handler_instance_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &_ap_event_cb, this, &_ap_ev_instance)){
191-
// log_e("event_handler_instance_register for WIFI_EVENT Failed!");
192-
// return false;
193-
// }
194-
// if(_esp_netif == NULL){
195-
// Network.onSysEvent(_onApArduinoEvent);
196-
// }
197-
198188
if(!WiFi.enableAP(true)) {
199189
log_e("AP enable failed!");
200190
return false;
201191
}
202-
203-
// // attach events and esp_netif here
204-
// if(_esp_netif == NULL){
205-
// _esp_netif = get_esp_interface_netif(ESP_IF_WIFI_AP);
206-
// /* attach to receive events */
207-
// initNetif(ESP_NETIF_ID_AP);
208-
// }
209-
210192
return true;
211193
}
212194

@@ -215,27 +197,16 @@ bool APClass::end(){
215197
log_e("AP disable failed!");
216198
return false;
217199
}
218-
// Network.removeEvent(_onApArduinoEvent);
219-
// // we just set _esp_netif to NULL here, so destroyNetif() does not try to destroy it.
220-
// // That would be done by WiFi.enableAP(false) if STA is not enabled, or when it gets disabled
221-
// _esp_netif = NULL;
222-
// destroyNetif();
223-
// if(_ap_ev_instance != NULL){
224-
// esp_event_handler_unregister(WIFI_EVENT, ESP_EVENT_ANY_ID, &_ap_event_cb);
225-
// _ap_ev_instance = NULL;
226-
// }
227200
return true;
228201
}
229202

230203
bool APClass::create(const char* ssid, const char* passphrase, int channel, int ssid_hidden, int max_connection, bool ftm_responder){
231204
if(!ssid || *ssid == 0) {
232-
// fail SSID missing
233205
log_e("SSID missing!");
234206
return false;
235207
}
236208

237209
if(passphrase && (strlen(passphrase) > 0 && strlen(passphrase) < 8)) {
238-
// fail passphrase too short
239210
log_e("passphrase too short!");
240211
return false;
241212
}

0 commit comments

Comments
 (0)