Fix preprocessor statement

This commit is contained in:
h2zero
2025-05-04 17:16:03 -06:00
parent 7a8d10bb71
commit 80def6663b

View File

@ -889,7 +889,7 @@ bool NimBLEDevice::init(const std::string& deviceName) {
esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT);
# endif
# if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0) | !defined(CONFIG_NIMBLE_CPP_IDF)
# if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0) || !defined(CONFIG_NIMBLE_CPP_IDF)
esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
# if defined(CONFIG_IDF_TARGET_ESP32)
bt_cfg.mode = ESP_BT_MODE_BLE;
@ -916,11 +916,13 @@ bool NimBLEDevice::init(const std::string& deviceName) {
return false;
}
# if CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE
err = esp_nimble_hci_init();
if (err != ESP_OK) {
NIMBLE_LOGE(LOG_TAG, "esp_nimble_hci_init() failed; err=%d", err);
return false;
}
# endif
# endif
# endif
nimble_port_init();