ESP8266 remove default opmode check (#835)

This commit is contained in:
Otto Winter 2019-11-05 21:56:35 +01:00 committed by GitHub
parent 8027facb39
commit 0cbd373817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);