mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2026-01-27 09:32:19 +01:00
[Breaking] Refactor NimBLEUUID.
* msbFirst parameter has been removed from constructor as it was unnecessary, caller should reverse the data first or call the new `reverseByteOrder` method after. * `getNative` method replaced with `getBase` which returns a read-only pointer to the UUID size underlying. * Added `reverseByteOrder` method, this will reverse the bytes of the UUID, which can be useful for advertising/logging. * Added `getValue` method, which returns a read-only `uint8_t` pointer to the UUID value. * Removed `m_valueSet` member variable, `bitSize()` can be used as a replacement. * General code cleanup.
This commit is contained in:
@@ -219,7 +219,7 @@ void NimBLEServer::start() {
|
||||
// with Notify / Indicate capabilities for event handling
|
||||
for(auto &svc : m_svcVec) {
|
||||
if(svc->m_removed == 0) {
|
||||
rc = ble_gatts_find_svc(&svc->getUUID().getNative()->u, &svc->m_handle);
|
||||
rc = ble_gatts_find_svc(svc->getUUID().getBase(), &svc->m_handle);
|
||||
if(rc != 0) {
|
||||
NIMBLE_LOGW(LOG_TAG, "GATT Server started without service: %s, Service %s",
|
||||
svc->getUUID().toString().c_str(), svc->isStarted() ? "missing" : "not started");
|
||||
@@ -412,7 +412,7 @@ std::string NimBLEServer::getPeerNameInternal(uint16_t conn_handle, TaskHandle_t
|
||||
int rc = ble_gattc_read_by_uuid(conn_handle,
|
||||
1,
|
||||
0xffff,
|
||||
((ble_uuid_t*)&uuid),
|
||||
&uuid.u,
|
||||
NimBLEServer::peerNameCB,
|
||||
taskData);
|
||||
if (rc != 0) {
|
||||
|
||||
Reference in New Issue
Block a user