-
-
Notifications
You must be signed in to change notification settings - Fork 284
Added setValue for strings #210
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
Conversation
Can you provide the context for this? |
Yes of course:
or something like:
|
The BLE library is undergo improvement. Will add in this change as part of the modification. Please note that "notification" is limited to 20 byte long. If the string you are sending out is longer than 20 byte, you may have to send it out in 20 byte segments. In that case, you can consider using an index pointer to walk down the string and specify the segment size for each setValue() call. You definitely do not want to just call setValue( myLongString ); |
The change looks fine to me, but I'm not sure if it's a necessary one. @SidLeung the BLE master what do you think? |
This is one of the API's that I forgot to port from BLEPeripheral. It makes it much nicer for setting a string value for the characteristic vs More info. at: https://github.com/sandeepmistry/arduino-BLEPeripheral/blob/master/API.md#set-value |
aaaf3db
to
1beffde
Compare
83c76a6
to
77d9086
Compare
Feature added: - This is directly pulled from Arduino community PR arduino#210. Overloading the setValue() method to take in a string as the only input parameter, instead of a pointer and its size.
PR #461 addresses this issue. Will be in the next release. Please review and close. |
This fix allows to use setValue() for const char* variables