@@ -79,8 +79,8 @@ void BLERemoteService::gattClientEventHandler(esp_gattc_cb_event_t event, esp_ga
79
79
80
80
// This is an indication that we now have the characteristic details for a characteristic owned
81
81
// by this service so remember it.
82
- m_characteristicMap.insert(std::pair<String , BLERemoteCharacteristic*>(
83
- BLEUUID(evtParam->get_char.char_id.uuid).toString(),
82
+ m_characteristicMap.insert(std::pair<std::string , BLERemoteCharacteristic*>(
83
+ BLEUUID(evtParam->get_char.char_id.uuid).toString().c_str() ,
84
84
new BLERemoteCharacteristic(evtParam->get_char.char_id, evtParam->get_char.char_prop, this) ));
85
85
86
86
@@ -134,7 +134,7 @@ BLERemoteCharacteristic *BLERemoteService::getCharacteristic(BLEUUID uuid) {
134
134
if (!m_haveCharacteristics) {
135
135
retrieveCharacteristics ();
136
136
}
137
- String v = uuid.toString ();
137
+ std::string v = uuid.toString (). c_str ();
138
138
for (auto &myPair : m_characteristicMap) {
139
139
if (myPair.first == v) {
140
140
return myPair.second ;
@@ -179,7 +179,9 @@ void BLERemoteService::retrieveCharacteristics() {
179
179
// We now have a new characteristic ... let us add that to our set of known characteristics
180
180
BLERemoteCharacteristic *pNewRemoteCharacteristic = new BLERemoteCharacteristic (result.char_handle , BLEUUID (result.uuid ), result.properties , this );
181
181
182
- m_characteristicMap.insert (std::pair<String, BLERemoteCharacteristic *>(pNewRemoteCharacteristic->getUUID ().toString (), pNewRemoteCharacteristic));
182
+ m_characteristicMap.insert (
183
+ std::pair<std::string, BLERemoteCharacteristic *>(pNewRemoteCharacteristic->getUUID ().toString ().c_str (), pNewRemoteCharacteristic)
184
+ );
183
185
m_characteristicMapByHandle.insert (std::pair<uint16_t , BLERemoteCharacteristic *>(result.char_handle , pNewRemoteCharacteristic));
184
186
offset++; // Increment our count of number of descriptors found.
185
187
} // Loop forever (until we break inside the loop).
@@ -192,7 +194,7 @@ void BLERemoteService::retrieveCharacteristics() {
192
194
* @brief Retrieve a map of all the characteristics of this service.
193
195
* @return A map of all the characteristics of this service.
194
196
*/
195
- std::map<String , BLERemoteCharacteristic *> *BLERemoteService::getCharacteristics () {
197
+ std::map<std::string , BLERemoteCharacteristic *> *BLERemoteService::getCharacteristics () {
196
198
log_v (" >> getCharacteristics() for service: %s" , getUUID ().toString ().c_str ());
197
199
// If is possible that we have not read the characteristics associated with the service so do that
198
200
// now. The request to retrieve the characteristics by calling "retrieveCharacteristics" is a blocking
0 commit comments