Improve readability with getHandle inline
Fork of BLE_API by
Revision 219:5603d539120c, committed 2014-12-01
- Comitter:
- rgrover1
- Date:
- Mon Dec 01 14:31:19 2014 +0000
- Parent:
- 218:8ae02569fab9
- Child:
- 220:e75e8ba1ff80
- Commit message:
- Synchronized with git rev 78696699
Author: Rohit Grover
add API to setup TxPowerLevels
Changed in this revision
services/URIBeaconConfigService.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/services/URIBeaconConfigService.h Mon Dec 01 14:31:19 2014 +0000 +++ b/services/URIBeaconConfigService.h Mon Dec 01 14:31:19 2014 +0000 @@ -141,16 +141,17 @@ } /** - * Update the txPower for a particular mode in the powerLevels table. + * Update the txPowerLevels table. */ - void setTxPowerLevel(TXPowerModes_t mode, int8_t txPowerIn) { - powerLevels[mode] = txPowerIn; + void setTxPowerLevels(const int8_t powerLevelsIn[NUM_POWER_MODES]) { + memcpy(powerLevels, powerLevelsIn, sizeof(powerLevels)); + updateTxPowerLevelsCharacteristic(); } /** * Set the effective power mode from one of the values in the powerLevels tables. */ - void useTxPowerMode(TXPowerModes_t mode) { + void setTxPowerMode(TXPowerModes_t mode) { txPowerMode = mode; configureGAP(); updateTxPowerModeCharacteristic();