Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
Revision 164:93e52c3861a9, committed 2014-11-28
- Comitter:
- rgrover1
- Date:
- Fri Nov 28 14:11:21 2014 +0000
- Parent:
- 163:8bd70d17589f
- Child:
- 165:ca406c1d0399
- Commit message:
- Synchronized with git rev f5827433
Author: Rohit Grover
restore uriData characteristic upon receiving a write if locked.
Changed in this revision
| services/URIBeacon2Service.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/services/URIBeacon2Service.h Fri Nov 28 14:11:21 2014 +0000
+++ b/services/URIBeacon2Service.h Fri Nov 28 14:11:21 2014 +0000
@@ -77,6 +77,11 @@
*/
virtual void onDataWritten(const GattCharacteristicWriteCBParams *params) {
if (params->charHandle == uriDataChar.getValueAttribute().getHandle()) {
+ if (lockedState) { /* when locked, the device isn't allowed to update the uriData characteristic */
+ ble.updateCharacteristicValue(uriDataChar.getValueAttribute().getHandle(), uriDataValue, uriDataLength);
+ return;
+ }
+
/* we don't handle very large writes at the moment. */
if ((params->offset != 0) || (params->len > MAX_SIZE_URI_DATA_CHAR_VALUE)) {
return;
