Skip to content

Commit 1606fb5

Browse files
committed
Conditionally guard disable_observer_mode behind ESP_PLATFORM and CONFIG_USING_NIMBLE_COMPONENT
1 parent 5d3eb65 commit 1606fb5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/NimBLEScan.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ NimBLEScan::NimBLEScan()
3939
.limited = 0, // no limited scan
4040
.passive = 1, // no scan response
4141
.filter_duplicates = 1, // filter duplicates
42-
# if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 2)
43-
.disable_observer_mode = 0, // observer role enabled
42+
# if defined(ESP_PLATFORM) && !defined(CONFIG_USING_NIMBLE_COMPONENT)
43+
# if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 2)
44+
.disable_observer_mode = 0,
45+
# endif
4446
# endif
4547
},
4648
m_pTaskData{nullptr},

0 commit comments

Comments
 (0)