File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -168,8 +168,8 @@ void NimBLEScan::setActiveScan(bool active) {
168168 * @details The controller has a limited buffer and will start reporting
169169 * dupicate devices once the limit is reached.
170170 */
171- void NimBLEScan::setDuplicateFilter (bool active ) {
172- m_scan_params.filter_duplicates = active ;
171+ void NimBLEScan::setDuplicateFilter (bool enabled ) {
172+ m_scan_params.filter_duplicates = enabled ;
173173} // setDuplicateFilter
174174
175175
@@ -178,8 +178,8 @@ void NimBLEScan::setDuplicateFilter(bool active) {
178178 * from devices advertising in limited discovery mode, i.e. directed advertising.
179179 * @param [in] active If true, only limited discovery devices will be in scan results.
180180 */
181- void NimBLEScan::setLimitedOnly (bool active ) {
182- m_scan_params.limited = active ;
181+ void NimBLEScan::setLimitedOnly (bool enabled ) {
182+ m_scan_params.limited = enabled ;
183183} // setLimited
184184
185185
@@ -236,6 +236,15 @@ void NimBLEScan::setWindow(uint16_t windowMSecs) {
236236} // setWindow
237237
238238
239+ /* *
240+ * @brief Get the status of the scanner.
241+ * @return true if scanning or scan starting.
242+ */
243+ bool NimBLEScan::isScanning () {
244+ return !m_stopped;
245+ }
246+
247+
239248/* *
240249 * @brief Start scanning.
241250 * @param [in] duration The duration in seconds for which to scan.
Original file line number Diff line number Diff line change @@ -62,12 +62,13 @@ class NimBLEScan {
6262public:
6363 bool start (uint32_t duration, void (*scanCompleteCB)(NimBLEScanResults), bool is_continue = false);
6464 NimBLEScanResults start (uint32_t duration, bool is_continue = false );
65+ bool isScanning ();
6566 void setAdvertisedDeviceCallbacks (NimBLEAdvertisedDeviceCallbacks* pAdvertisedDeviceCallbacks, bool wantDuplicates = false );
6667 void setActiveScan (bool active);
6768 void setInterval (uint16_t intervalMSecs);
6869 void setWindow (uint16_t windowMSecs);
69- void setDuplicateFilter (bool active );
70- void setLimitedOnly (bool active );
70+ void setDuplicateFilter (bool enabled );
71+ void setLimitedOnly (bool enabled );
7172 void setFilterPolicy (uint8_t filter);
7273 bool stop ();
7374 void clearResults ();
You can’t perform that action at this time.
0 commit comments