MI32: fix server notifications/indications (#23686)

This commit is contained in:
Christian Baars 2025-07-15 20:25:41 +02:00 committed by GitHub
parent a38146cc95
commit 08f2826e97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1669,7 +1669,7 @@ void MI32ServerSetCharacteristic(NimBLEServer *pServer, std::vector<NimBLEServic
MI32.infoMsg = MI32_SERV_CHARACTERISTIC_ADDED;
}
pCharacteristic->setValue(MI32.conCtx->buffer + 1, MI32.conCtx->buffer[0]); // set value
pCharacteristic->notify(true); // TODO: fallback to indication
MI32.conCtx->response ? pCharacteristic->indicate() : pCharacteristic->notify(); // use response to select indicate vs notification
struct{
BLERingBufferItem_t header;
} item;