Demo for the Tx Power service
Dependencies: BLE_API mbed nRF51822
Demo for the Tx Power service (included in the services folder). i kept the service format the same as the official mbed libraries.
Revision 1:c856cfe550a7, committed 2014-12-15
- Comitter:
- KarimAzzouz
- Date:
- Mon Dec 15 18:17:52 2014 +0000
- Parent:
- 0:1d89681580f2
- Commit message:
- added the updateTxPower method to the example
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Dec 15 17:54:09 2014 +0000 +++ b/main.cpp Mon Dec 15 18:17:52 2014 +0000 @@ -14,7 +14,8 @@ ble.init(); ble.onDisconnection(disconnectionCallback); - TxPowerService(ble, -30); + TxPowerService tx(ble, -30); // setting up the service and assigning an initial value + tx.updateTxPower(-10); //changing the initial value just for testing .... ble.accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE); ble.setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED);