Refactor 2904 descriptor

* General code cleanup.
* Added method `NimBLECharacteristic::create2904` which will specifically create a CPF(0x2904) descriptor.
This commit is contained in:
h2zero authored and h2zero committed 2024-11-30 14:21:39 -07:00
1 parent 47c3cd5b84
commit b4fe046c56
5 files changed
+59 -60

No files matched your search

@@ -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);