From bd24fabae4e76e58d660225a3fdfa9f27cfb1639 Mon Sep 17 00:00:00 2001 From: toxuin Date: Sun, 14 Oct 2018 17:41:31 -0600 Subject: [PATCH] Release memory from CLASSIC_BT when not enabled --- cpp_utils/BLEDevice.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/cpp_utils/BLEDevice.cpp b/cpp_utils/BLEDevice.cpp index 157074d4..dcba79eb 100644 --- a/cpp_utils/BLEDevice.cpp +++ b/cpp_utils/BLEDevice.cpp @@ -354,13 +354,7 @@ BLEAdvertising* BLEDevice::m_bleAdvertising = nullptr; } #ifndef CLASSIC_BT_ENABLED - // esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); //FIXME waiting for response from esp-idf issue - errRc = esp_bt_controller_enable(ESP_BT_MODE_BLE); - //errRc = esp_bt_controller_enable(ESP_BT_MODE_BTDM); - if (errRc != ESP_OK) { - ESP_LOGE(LOG_TAG, "esp_bt_controller_enable: rc=%d %s", errRc, GeneralUtils::errorToString(errRc)); - return; - } + esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); #else errRc = esp_bt_controller_enable(ESP_BT_MODE_BTDM); if (errRc != ESP_OK) {