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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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