ESP8266 remove default opmode check (#835)

This commit is contained in:
Otto Winter 2019-11-05 21:56:35 +01:00
parent fdbc59a159
commit 4f3a74d08a
No known key found for this signature in database
GPG key ID: DB66C0BE6013F97E

View file

@ -410,19 +410,6 @@ bool WiFiComponent::wifi_sta_pre_setup_() {
void WiFiComponent::wifi_pre_setup_() { void WiFiComponent::wifi_pre_setup_() {
wifi_set_event_handler_cb(&WiFiComponent::wifi_event_callback); wifi_set_event_handler_cb(&WiFiComponent::wifi_event_callback);
// Make sure the default opmode is OFF
uint8_t default_opmode = wifi_get_opmode_default();
if (default_opmode != 0) {
ESP_LOGV(TAG, "Setting default WiFi Mode to 0 (was %u)", default_opmode);
ETS_UART_INTR_DISABLE();
bool ret = wifi_set_opmode(0);
ETS_UART_INTR_ENABLE();
if (!ret) {
ESP_LOGW(TAG, "Setting default WiFi mode failed!");
}
}
// Make sure WiFi is in clean state before anything starts // Make sure WiFi is in clean state before anything starts
this->wifi_mode_(false, false); this->wifi_mode_(false, false);