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.
Dependents: BLE_ANCS_SDAPI BLE_temperature BLE_HeartRate BLE_ANCS_SDAPI_IRC ... more
Diff: services/URIBeacon2Service.h
- Revision:
- 165:ca406c1d0399
- Parent:
- 164:93e52c3861a9
- Child:
- 166:a03959283d48
diff -r 93e52c3861a9 -r ca406c1d0399 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
@@ -61,7 +61,7 @@
return;
}
- GattCharacteristic *charTable[] = {&lockedStateChar, &uriDataChar};
+ GattCharacteristic *charTable[] = {&lockedStateChar, &uriDataChar, &flagsChar};
GattService beaconControlService(URIBeacon2ControlServiceUUID, charTable, sizeof(charTable) / sizeof(GattCharacteristic *));
ble.addService(beaconControlService);
@@ -82,7 +82,7 @@
return;
}
- /* we don't handle very large writes at the moment. */
+ /* We don't handle very large writes at the moment. */
if ((params->offset != 0) || (params->len > MAX_SIZE_URI_DATA_CHAR_VALUE)) {
return;
}
@@ -90,7 +90,7 @@
uriDataLength = params->len;
memcpy(uriDataValue, params->data, uriDataLength);
} else if (params->charHandle == flagsChar.getValueAttribute().getHandle()) {
- if (lockedState) {
+ if (lockedState) { /* when locked, the device isn't allowed to update the flags characteristic */
ble.updateCharacteristicValue(flagsChar.getValueAttribute().getHandle(), &flags, 1 /* size */);
return;
} else {