Skip to content

Commit 883013d

Browse files
committed
Fix build with idf versions < 5.x
1 parent c2c7e3b commit 883013d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/NimBLEDevice.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -915,9 +915,11 @@ bool NimBLEDevice::init(const std::string& deviceName) {
915915
# endif
916916

917917
# if CONFIG_BTDM_BLE_SCAN_DUPL
918-
bt_cfg.normal_adv_size = m_scanDuplicateSize;
919-
bt_cfg.scan_duplicate_type = m_scanFilterMode;
918+
bt_cfg.normal_adv_size = m_scanDuplicateSize;
919+
bt_cfg.scan_duplicate_type = m_scanFilterMode;
920+
# if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
920921
bt_cfg.dup_list_refresh_period = m_scanDuplicateResetTime;
922+
# endif
921923
# elif CONFIG_BT_LE_SCAN_DUPL
922924
bt_cfg.ble_ll_rsp_dup_list_count = m_scanDuplicateSize;
923925
bt_cfg.ble_ll_adv_dup_list_count = m_scanDuplicateSize;

0 commit comments

Comments
 (0)