Avoid creating a new espbt::ESPBTUUID each loop when registering for notify (#4069)

This commit is contained in:
J. Nick Koston 2022-11-22 14:46:59 -06:00 committed by Jesse Hills
parent b2e6b9d31f
commit 1c9c700d7f
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A

View File

@ -299,7 +299,7 @@ BLEDescriptor *BLEClientBase::get_config_descriptor(uint16_t handle) {
auto *chr = this->get_characteristic(handle);
if (chr != nullptr) {
for (auto &desc : chr->descriptors) {
if (desc->uuid == espbt::ESPBTUUID::from_uint16(0x2902))
if (desc->uuid.get_uuid().uuid.uuid16 == 0x2902)
return desc;
}
}