We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9b86c7 commit 7f3987bCopy full SHA for 7f3987b
hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/ESP8266WiFi.cpp
@@ -43,10 +43,11 @@ extern "C" void esp_yield();
43
ESP8266WiFiClass::ESP8266WiFiClass()
44
: _smartConfigStarted(false)
45
, _smartConfigDone(false)
46
-, _useApMode(false)
47
-, _useClientMode(false)
48
, _useStaticIp(false)
49
{
+ uint8 m = wifi_get_opmode();
+ _useClientMode = (m & WIFI_STA);
50
+ _useApMode = (m & WIFI_AP_STA);
51
wifi_set_event_handler_cb((wifi_event_handler_cb_t)&ESP8266WiFiClass::_eventCallback);
52
}
53
0 commit comments