From b2d88d57a906ce1ad973c118448c23c773a912ea Mon Sep 17 00:00:00 2001 From: billprozac Date: Wed, 25 Sep 2019 01:05:54 -0400 Subject: [PATCH] Update BLEDevice.cpp Pretty sure this was a typo as the deinit doesn't actually allow for reinit if that is an ifndef. Changed in my local copy and can now deinit and reinit just fine. Also, not sure why we are checking for the architecture here. Just curious. --- libraries/BLE/src/BLEDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/BLE/src/BLEDevice.cpp b/libraries/BLE/src/BLEDevice.cpp index db45d07bd13..cd0dd6bfab5 100644 --- a/libraries/BLE/src/BLEDevice.cpp +++ b/libraries/BLE/src/BLEDevice.cpp @@ -625,7 +625,7 @@ void BLEDevice::removePeerDevice(uint16_t conn_id, bool _client) { esp_bluedroid_deinit(); esp_bt_controller_disable(); esp_bt_controller_deinit(); -#ifndef ARDUINO_ARCH_ESP32 +#ifdef ARDUINO_ARCH_ESP32 if (release_memory) { esp_bt_controller_mem_release(ESP_BT_MODE_BTDM); // <-- require tests because we released classic BT memory and this can cause crash (most likely not, esp-idf takes care of it) } else {