Update for latest nRF51822 code changes.
Dependencies: BLE_API nRF51822
Fork of Puck by
Diff: Puck.cpp
- Revision:
- 1:29b2cca0d529
- Parent:
- 0:718051934fdb
diff -r 718051934fdb -r 29b2cca0d529 Puck.cpp --- 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. */