Fix: Descriptor list incomplete when Notify property set.

This commit is contained in:
h2zero 2020-05-10 20:28:28 -06:00
parent f0191eb1e6
commit bbeae9df6b

View file

@ -111,8 +111,9 @@ bool NimBLEService::start() {
if(numDscs) {
// skip 2902 as it's automatically created by NimBLE
// if Indicate or Notify flags are set
if((pCharacteristic->m_properties & BLE_GATT_CHR_F_INDICATE) ||
(pCharacteristic->m_properties & BLE_GATT_CHR_F_NOTIFY)) {
if(((pCharacteristic->m_properties & BLE_GATT_CHR_F_INDICATE) ||
(pCharacteristic->m_properties & BLE_GATT_CHR_F_NOTIFY)) &&
pCharacteristic->getDescriptorByUUID("2902") != nullptr) {
numDscs--;
}
}