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
Diff: services/URIBeacon2Service.h
- Revision:
- 164:93e52c3861a9
- Parent:
- 163:8bd70d17589f
- Child:
- 165:ca406c1d0399
diff -r 8bd70d17589f -r 93e52c3861a9 services/URIBeacon2Service.h --- 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;