Fork of Nordic's 'Puck' library

Dependencies:   BLE_API nRF51822

Fork of Puck by Nordic Pucks

Fixes for changes in BLE_API. Affects only `Puck.h`. Don't use this if fixed upstream.

Revision:
20:29b0143f3af3
Parent:
18:4c95a470d778
Child:
21:00a3567124e3
--- a/Puck.h	Sun Mar 01 18:37:05 2015 +0000
+++ b/Puck.h	Tue Mar 03 20:51:34 2015 +0000
@@ -205,11 +205,16 @@
     ble.init();
     LOG_DEBUG("Inited BLEDevice.\n");
     setState(DISCONNECTED);
-
+    
+    char deviceName[10];
+    sprintf(&deviceName[0], "Puck %04X", minor);
+    deviceName[9] = '\0';
+    ble.setDeviceName((const uint8_t*) deviceName);
+    
     ble.accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED);
     LOG_DEBUG("Accumulate advertising payload: BREDR_NOT_SUPPORTED.\n");
     
-    ble.accumulateAdvertisingPayload(GapAdvertisingData::MANUFACTURER_SPECIFIC_DATA, beaconPayload, sizeof(beaconPayload));
+    //ble.accumulateAdvertisingPayload(GapAdvertisingData::MANUFACTURER_SPECIFIC_DATA, beaconPayload, sizeof(beaconPayload));
     LOG_DEBUG("Accumulate advertising payload: beacon data.\n");
     
     ble.setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED);