Skip to content

Commit e26c740

Browse files
committed
Improve macros for code enablement
1 parent a547f25 commit e26c740

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# See https://hub.docker.com/r/espressif/idf/tags and
1818
# https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html
1919
# for details.
20-
idf_ver: ["release-v4.4", "release-v5.4"]
20+
idf_ver: ["release-v4.4", "release-v5.4", "release-v5.5"]
2121
idf_target: ["esp32", "esp32s3", "esp32c2", "esp32c3", "esp32c5", "esp32c6", "esp32h2", "esp32p4"]
2222
example:
2323
- NimBLE_Client

src/NimBLECharacteristic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
# include "NimBLECharacteristic.h"
1919
#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
2020

21-
#if defined(ESP_IDF_VERSION_MAJOR)
22-
# if defined(CONFIG_NIMBLE_CPP_IDF) && ESP_IDF_VERSION_MAJOR < 5
21+
#if defined(CONFIG_NIMBLE_CPP_IDF)
22+
# if !defined(ESP_IDF_VERSION_MAJOR) || ESP_IDF_VERSION_MAJOR < 5
2323
# define ble_gatts_notify_custom ble_gattc_notify_custom
2424
# define ble_gatts_indicate_custom ble_gattc_indicate_custom
2525
# endif

src/NimBLEDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ bool NimBLEDevice::injectConfirmPasskey(const NimBLEConnInfo& peerInfo, bool acc
12901290
* @param [in] deviceName The name to set.
12911291
*/
12921292
bool NimBLEDevice::setDeviceName(const std::string& deviceName) {
1293-
#if !defined(ESP_IDF_VERSION) || ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 5, 0) || CONFIG_BT_NIMBLE_GAP_SERVICE
1293+
#if !defined(MYNEWT_VAL_BLE_GATTS) || MYNEWT_VAL(BLE_GATTS) > 0
12941294
int rc = ble_svc_gap_device_name_set(deviceName.c_str());
12951295
if (rc != 0) {
12961296
NIMBLE_LOGE(LOG_TAG, "Device name not set - too long");

0 commit comments

Comments
 (0)