-
-
Notifications
You must be signed in to change notification settings - Fork 284
Correct duplicate filter inversion #476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct duplicate filter inversion #476
Conversation
Scanning with duplicates should disable the filter, scanning without duplicates should enable the filter.
@@ -578,7 +578,7 @@ BLEDevice BLEDeviceManager::peripheral() | |||
|
|||
bool BLEDeviceManager::startScanning() | |||
{ | |||
_adv_duplicate_filter_enabled = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you can change code here. If you changed code here, it will make developer confusing. I think change the code in BLEDevice.cpp is more reasonable.
I was actually expecting scan(true) to turn on the duplicate filter so you see devices only once. Is the following the correct behavior? |
system test passed |
Bug fixed: This feature was implemented in PR arduino#457, merged, and released in Deneb.RC1. However, it was discovered that the logic was inverted and was report as Git issue arduino#476. BLE scan() and input parameter withDuplicates is true means reporting all Peripherals detected regardless how many times it was reported. Code mods: 1. libraries/CurieBLE/src/BLEDevice.cpp: - In startScan, calls the correct routine to scan for all Peripherals if withDuplicates is true. Otherwise, just scan for new ones. 2. libraries/CurieBLE/src/BLEDevice.h: - Prototyping. 3. libraries/CurieBLE/src/internal/BLEDeviceManager.h, libraries/CurieBLE/src/internal/BLEDeviceManager.cpp - Modified header comment to reflect the input parameter withDuplictes correct meaning. - Default the input parameter, withDupilcates, as true. - And, consequently, eliminated some redundant methods.
Bug fixed: This feature was implemented in PR arduino#457, merged, and released in Deneb.RC1. However, it was discovered that the logic was inverted and was report as Git issue arduino#476. BLE scan() and input parameter withDuplicates is true means reporting all Peripherals detected regardless how many times it was reported. Code mods: 1. libraries/CurieBLE/src/BLEDevice.cpp: - In startScan, calls the correct routine to scan for all Peripherals if withDuplicates is true. Otherwise, just scan for new ones. 2. libraries/CurieBLE/src/BLEDevice.h: - Prototyping. 3. libraries/CurieBLE/src/internal/BLEDeviceManager.h, libraries/CurieBLE/src/internal/BLEDeviceManager.cpp - Modified header comment to reflect the input parameter withDuplictes correct meaning. - Default the input parameter, withDupilcates, as true. - And, consequently, eliminated some redundant methods.
Bug fixed: This feature was implemented in PR arduino#457, merged, and released in Deneb.RC1. However, it was discovered that the logic was inverted and was report as Git issue arduino#476. BLE scan() and input parameter withDuplicates is true means reporting all Peripherals detected regardless how many times it was reported. Code mods: 1. libraries/CurieBLE/src/BLEDevice.cpp: - In startScan, calls the correct routine to scan for all Peripherals if withDuplicates is true. Otherwise, just scan for new ones. 2. libraries/CurieBLE/src/BLEDevice.h: - Prototyping. 3. libraries/CurieBLE/src/internal/BLEDeviceManager.h, libraries/CurieBLE/src/internal/BLEDeviceManager.cpp - Modified header comment to reflect the input parameter withDuplictes correct meaning. - Default the input parameter, withDupilcates, as true. - And, consequently, eliminated some redundant methods.
This PR is replaced by the following PR, |
Scanning with duplicates should disable the filter, scanning without duplicates should enable the filter.
Related to #368.