Update for latest nRF51822 code changes.
Dependencies: BLE_API nRF51822
Fork of Puck by
Revision 1:29b2cca0d529, committed 2014-07-17
- Comitter:
- stiaje
- Date:
- Thu Jul 17 08:46:50 2014 +0000
- Parent:
- 0:718051934fdb
- Child:
- 2:38614fd0fcce
- Commit message:
- Make all pucks connectable
Changed in this revision
Puck.cpp | Show annotated file Show diff for this revision Revisions of this file |
Puck.hpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Puck.cpp Tue Jul 15 14:33:09 2014 +0000 +++ b/Puck.cpp Thu Jul 17 08:46:50 2014 +0000 @@ -1,7 +1,7 @@ #include "mbed.h" #include "Puck.hpp" -Puck::Puck(bool connectable, uint16_t minor) : _connectable(connectable) { +Puck::Puck(uint16_t minor) { /* * The Beacon payload (encapsulated within the MSD advertising data structure) * has the following composition: @@ -34,11 +34,7 @@ _ble.accumulateAdvertisingPayload(GapAdvertisingData::MANUFACTURER_SPECIFIC_DATA, _beaconPayload, sizeof(_beaconPayload)); - if (_connectable) { - _ble.setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED); - } else { - _ble.setAdvertisingType(GapAdvertisingParams::ADV_NON_CONNECTABLE_UNDIRECTED); - } + _ble.setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED); _ble.setAdvertisingInterval(160); /* 100ms; in multiples of 0.625ms. */
--- a/Puck.hpp Tue Jul 15 14:33:09 2014 +0000 +++ b/Puck.hpp Thu Jul 17 08:46:50 2014 +0000 @@ -10,12 +10,10 @@ uint8_t _beaconPayload[25]; - bool _connectable; - public: /** Initialize the Puck library */ - Puck(bool connectable, uint16_t minor); + Puck(uint16_t minor); /** The BLE Device * @return ble device