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: microbit-dal microbit-dal microbit-ble-open microbit-dal ... more
Fork of BLE_API by
Diff: services/URIBeaconConfigService.h
- Revision:
- 221:f813cddc145b
- Parent:
- 220:e75e8ba1ff80
- Child:
- 222:33b04c693e83
diff -r e75e8ba1ff80 -r f813cddc145b services/URIBeaconConfigService.h
--- a/services/URIBeaconConfigService.h Mon Dec 01 14:31:19 2014 +0000
+++ b/services/URIBeaconConfigService.h Mon Dec 01 14:31:19 2014 +0000
@@ -301,11 +301,19 @@
} else if (params->charHandle == txPowerLevelsChar.getValueAttribute().getHandle()) {
if (lockedState) { /* When locked, the device isn't allowed to update the characteristic. */
/* Restore GATT database with previous value. */
- ble.updateCharacteristicValue(txPowerLevelsChar.getValueAttribute().getHandle(), reinterpret_cast<uint8_t *>(powerLevels), NUM_POWER_MODES * sizeof(int8_t));
+ updateTxPowerLevelsCharacteristic();
return;
} else {
memcpy(powerLevels, params->data, NUM_POWER_MODES * sizeof(int8_t));
}
+ } else if (params->charHandle == txPowerModeChar.getValueAttribute().getHandle()) {
+ if (lockedState) { /* When locked, the device isn't allowed to update the characteristic. */
+ /* Restore GATT database with previous value. */
+ updateTxPowerModeCharacteristic();
+ return;
+ } else {
+ txPowerMode = *reinterpret_cast<const TXPowerModes_t *>(params->data);
+ }
} else if (params->charHandle == beaconPeriodChar.getValueAttribute().getHandle()) {
if (lockedState) { /* When locked, the device isn't allowed to update the characteristic. */
/* Restore GATT database with previous value. */
