mirror of
https://github.com/esphome/esphome.git
synced 2024-11-29 18:24:13 +01:00
ESP8266 remove default opmode check (#835)
This commit is contained in:
parent
8027facb39
commit
0cbd373817
1 changed files with 0 additions and 13 deletions
|
@ -410,19 +410,6 @@ bool WiFiComponent::wifi_sta_pre_setup_() {
|
|||
|
||||
void WiFiComponent::wifi_pre_setup_() {
|
||||
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
|
||||
this->wifi_mode_(false, false);
|
||||
|
|
Loading…
Reference in a new issue