mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 17:05:21 +01:00
Avoid creating a new espbt::ESPBTUUID each loop when registering for notify (#4069)
This commit is contained in:
parent
fef60e335e
commit
1f33ad037d
1 changed files with 1 additions and 1 deletions
|
@ -299,7 +299,7 @@ BLEDescriptor *BLEClientBase::get_config_descriptor(uint16_t handle) {
|
||||||
auto *chr = this->get_characteristic(handle);
|
auto *chr = this->get_characteristic(handle);
|
||||||
if (chr != nullptr) {
|
if (chr != nullptr) {
|
||||||
for (auto &desc : chr->descriptors) {
|
for (auto &desc : chr->descriptors) {
|
||||||
if (desc->uuid == espbt::ESPBTUUID::from_uint16(0x2902))
|
if (desc->uuid.get_uuid().uuid.uuid16 == 0x2902)
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue