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:
- 166:a03959283d48
- Parent:
- 165:ca406c1d0399
- Child:
- 167:8057dc59ac08
--- 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,7 +77,8 @@ */ 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 */ + if (lockedState) { /* When locked, the device isn't allowed to update the uriData characteristic. */ + /* Restore GATT database with previous value. */ ble.updateCharacteristicValue(uriDataChar.getValueAttribute().getHandle(), uriDataValue, uriDataLength); return; } @@ -90,7 +91,8 @@ uriDataLength = params->len; memcpy(uriDataValue, params->data, uriDataLength); } else if (params->charHandle == flagsChar.getValueAttribute().getHandle()) { - if (lockedState) { /* when locked, the device isn't allowed to update the flags characteristic */ + if (lockedState) { /* When locked, the device isn't allowed to update the flags characteristic. */ + /* Restore GATT database with previous value. */ ble.updateCharacteristicValue(flagsChar.getValueAttribute().getHandle(), &flags, 1 /* size */); return; } else {