Update esphome/components/esp32_ble_server/ble_characteristic.cpp

Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
This commit is contained in:
Rodrigo Martín 2024-10-20 11:38:31 +02:00 committed by GitHub
parent c3b29fbfab
commit 0bddfa1b39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,7 +72,7 @@ void BLECharacteristic::add_descriptor(BLEDescriptor *descriptor) {
[this](const std::vector<uint8_t> &value, uint16_t conn_id) {
if (value.size() != 2)
return;
uint16_t cccd = (value[1] << 8) | value[0];
uint16_t cccd = encode_uint16(value[1], value[0]);
bool notify = (cccd & 1) != 0;
bool indicate = (cccd & 2) != 0;
if (notify || indicate) {