10000 More chnages for #99 · rainbowyu/esp32-snippets@036971d · GitHub
[go: up one dir, main page]

Skip to content

Commit 036971d

Browse files
committed
More chnages for nkolban#99
1 parent c288b0b commit 036971d

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

cpp_utils/BLERemoteCharacteristic.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ BLERemoteCharacteristic::BLERemoteCharacteristic(
4141
m_pRemoteService = pRemoteService;
4242
m_notifyCallback = nullptr;
4343

44-
retrieveCharacteristics(); // Get the descriptors for this characteristic
44+
retrieveDescriptors(); // Get the descriptors for this characteristic
4545
ESP_LOGD(LOG_TAG, "<< BLERemoteCharacteristic");
4646
} // BLERemoteCharacteristic
4747

@@ -276,8 +276,8 @@ void BLERemoteCharacteristic::gattClientEventHandler(
276276
/**
277277
* @brief Populate the descriptors (if any) for this characteristic.
278278
*/
279-
void BLERemoteCharacteristic::retrieveCharacteristics() {
280-
ESP_LOGD(LOG_TAG, ">> retrieveCharacteristics() for characteristic: %s", getUUID().toString().c_str());
279+
void BLERemoteCharacteristic::retrieveDescriptors() {
280+
ESP_LOGD(LOG_TAG, ">> retrieveDescriptors() for characteristic: %s", getUUID().toString().c_str());
281281

282282
removeDescriptors(); // Remove any existing descriptors.
283283

@@ -322,7 +322,7 @@ void BLERemoteCharacteristic::retrieveCharacteristics() {
322322
offset++;
323323
} // while true
324324
//m_haveCharacteristics = true; // Remember that we have received the characteristics.
325-
ESP_LOGD(LOG_TAG, "<< getDescriptors(): Found %d descriptors.", offset);
325+
ESP_LOGD(LOG_TAG, "<< retrieveDescriptors(): Found %d descriptors.", offset);
326326
} // getDescriptors
327327

328328

cpp_utils/BLERemoteCharacteristic.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class BLERemoteCharacteristic {
3737
bool canWrite();
3838
bool canWriteNoResponse();
3939
BLERemoteDescriptor *getDescriptor(BLEUUID uuid);
40+
std::map<std::string, BLERemoteDescriptor *>* getDescriptors();
4041
BLEUUID getUUID();
4142
std::string readValue(void);
4243
uint8_t readUInt8(void);
@@ -59,11 +60,11 @@ class BLERemoteCharacteristic {
5960
esp_gattc_cb_event_t event,
6061
esp_gatt_if_t gattc_if,
6162
esp_ble_gattc_cb_param_t* evtParam);
62-
std::map<std::string, BLERemoteDescriptor *>* getDescriptors();
63+
6364
uint16_t getHandle();
6465
BLERemoteService* getRemoteService();
6566
void removeDescriptors();
66-
void retrieveCharacteristics();
67+
void retrieveDescriptors();
6768

6869
// Private properties
6970
BLEUUID m_uuid;

0 commit comments

Comments
 (0)
0