with 2 advertisers

Dependencies:   ADXL345_nRF51 BLE_API advertiser_data mbed nRF51822

Fork of BLE_GAP_Acceleration_Observer by Ames HCI IoT

Revision:
11:8bfc379ad93f
Parent:
10:0733d4800ed1
Child:
13:7816784106fe
--- a/main.cpp	Thu Jul 23 12:38:40 2015 +0000
+++ b/main.cpp	Thu Jul 23 19:28:04 2015 +0000
@@ -76,20 +76,20 @@
 void advertisementCallback(const Gap::AdvertisementCallbackParams_t *params)
 {
 #ifdef DEBUG
-    pc.printf("Found device...\n");
+    pc.printf("Found device...\n\r");
 #endif
     if (params->peerAddr[5] == 0xe5 && params->peerAddr[4] == 0x4f) {
 #ifdef DEBUG
         for (unsigned index = 0; index < params->advertisingDataLen; index++) {
           pc.printf("%02x ", params->advertisingData[index]);
         }
-        pc.printf("\n");
+        pc.printf("\n\r");
 #endif
         /* Using only the 3rd part of address for indexing the stored data for now */
         advertiser_data *pdata = get_advertiser_data(params->peerAddr[3]);
         if (!pdata) {
 #ifdef DEBUG
-            pc.printf("Too many advertisers!\n");
+            pc.printf("Too many advertisers!\n\r");
 #endif
             return;
         }
@@ -110,7 +110,7 @@
                 return;
             } else if (diff > 1) {
 #ifdef DEBUG
-                pc.printf("resetting: diff is %d\n", diff);
+                pc.printf("resetting: diff is %d\n\r", diff);
 #endif
                 /* Reset the data if we missed a packet (likely lost signal for a while) */
                 advertiser_data_reset(pdata);