1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 19:02:18 +01:00

Release BT controller unused memory in the right place (#1095)

This commit is contained in:
buxtronix
2020-06-28 07:06:13 +10:00
committed by GitHub
parent 148f5d9418
commit ca4107d450

View File

@@ -99,14 +99,14 @@ bool ESP32BLETracker::ble_setup() {
return false;
}
esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT);
// Initialize the bluetooth controller with the default configuration
if (!btStart()) {
ESP_LOGE(TAG, "btStart failed: %d", esp_bt_controller_get_status());
return false;
}
esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT);
err = esp_bluedroid_init();
if (err != ESP_OK) {
ESP_LOGE(TAG, "esp_bluedroid_init failed: %d", err);