nordic
Fork of nRF51822 by
Diff: btle/btle_discovery.cpp
- Revision:
- 283:6633922380bf
- Parent:
- 282:2280bb1a9a9e
- Child:
- 284:c4c2aeab86c3
--- a/btle/btle_discovery.cpp Fri Jun 19 15:55:26 2015 +0100 +++ b/btle/btle_discovery.cpp Fri Jun 19 15:55:26 2015 +0100 @@ -146,8 +146,11 @@ { /* Iterate through the previously discovered characteristics cached in characteristics[]. */ while (cDiscoveryActive && (characteristicIndex < numCharacteristics)) { - if (characteristicCallback) { - characteristicCallback(characteristics[characteristicIndex]); + if ((matchingCharacteristicUUID == ShortUUIDBytes_t(BLE_UUID_UNKNOWN)) || + (matchingCharacteristicUUID == characteristics[characteristicIndex].getShortUUID())) { + if (characteristicCallback) { + characteristicCallback(characteristics[characteristicIndex]); + } } characteristicIndex++;