-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(BLE): Arduino String shall not be used within std::map<> #9875
Conversation
👋 Hello SuGlider, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
Test Results 56 files 56 suites 5m 16s ⏱️ Results for commit 88ea692. ♻️ This comment has been updated with latest results. |
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
Description of Change
This PR partially reverts changes done in PR #8724 related to using Arduino
String
, as a Key, withinstd::map<>
.It replaces Arduino
String
bystd::string
which is a C++ class compatible withstd::map<>
template, that must implementstd::less
in order to allow necesary comparation when inserting<Key, T>
into the map.Tests scenarios
Tested using ESP32, ESP32-S3 and ESP32-C6.
In order to test it, it is possible to use the BLE Client example running in one ESP32 SoC
https://github.com/espressif/arduino-esp32/blob/master/libraries/BLE/examples/Client/Client.ino
The second ESP32 SoC shall run a modified version of the BLE Server that adds a second characteristic in the same service.
Based on the code of https://github.com/espressif/arduino-esp32/blob/master/libraries/BLE/examples/Server/Server.ino
Related links
Fix #9768