forked from h2zero/esp-nimble-cpp
Refactor 2904 descriptor
* General code cleanup. * Added method `NimBLECharacteristic::create2904` which will specifically create a CPF(0x2904) descriptor.
This commit is contained in:
@@ -195,7 +195,7 @@ void app_main(void) {
|
||||
* and sizes. However we must cast the returned reference to the correct type as the method
|
||||
* only returns a pointer to the base NimBLEDescriptor class.
|
||||
*/
|
||||
NimBLE2904* pBeef2904 = (NimBLE2904*)pBeefCharacteristic->createDescriptor("2904");
|
||||
NimBLE2904* pBeef2904 = pBeefCharacteristic->create2904();
|
||||
pBeef2904->setFormat(NimBLE2904::FORMAT_UTF8);
|
||||
pBeef2904->setCallbacks(&dscCallbacks);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user