Skip to content

Commit 3296488

Browse files
committed
Remove commented code
1 parent beee4f7 commit 3296488

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

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

-27
Original file line numberDiff line numberDiff line change
@@ -320,28 +320,10 @@ bool STAClass::onDisable(){
320320
}
321321

322322
bool STAClass::begin(bool tryConnect){
323-
324-
// Network.begin();
325-
// if(_sta_ev_instance == NULL && esp_event_handler_instance_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &_sta_event_cb, this, &_sta_ev_instance)){
326-
// log_e("event_handler_instance_register for WIFI_EVENT Failed!");
327-
// return false;
328-
// }
329-
// if(_esp_netif == NULL){
330-
// Network.onSysEvent(_onStaArduinoEvent);
331-
// }
332-
333323
if(!WiFi.enableSTA(true)) {
334324
log_e("STA enable failed!");
335325
return false;
336326
}
337-
338-
// // attach events and esp_netif here
339-
// if(_esp_netif == NULL){
340-
// _esp_netif = get_esp_interface_netif(ESP_IF_WIFI_STA);
341-
// /* attach to receive events */
342-
// initNetif(ESP_NETIF_ID_STA);
343-
// }
344-
345327
if(tryConnect){
346328
return connect();
347329
}
@@ -353,15 +335,6 @@ bool STAClass::end(){
353335
log_e("STA disable failed!");
354336
return false;
355337
}
356-
// Network.removeEvent(_onStaArduinoEvent);
357-
// // we just set _esp_netif to NULL here, so destroyNetif() does not try to destroy it.
358-
// // That would be done by WiFi.enableSTA(false) if AP is not enabled, or when it gets disabled
359-
// _esp_netif = NULL;
360-
// destroyNetif();
361-
// if(_sta_ev_instance != NULL){
362-
// esp_event_handler_unregister(WIFI_EVENT, ESP_EVENT_ANY_ID, &_sta_event_cb);
363-
// _sta_ev_instance = NULL;
364-
// }
365338
return true;
366339
}
367340

0 commit comments

Comments
 (0)