TOF based Presence Detector

Dependencies:   BLE_API X_NUCLEO_6180XA1 X_NUCLEO_IDB0XA1 mbed

Fork of BLE_HeartRate_IDB0XA1 by ST

Revision:
28:a23b16555909
Parent:
27:32267cee7cb8
--- a/detection.cpp	Sat Jan 14 08:43:14 2017 +0000
+++ b/detection.cpp	Mon Aug 20 16:42:59 2018 +0000
@@ -17,19 +17,19 @@
 
    Service address(0xA020,"Address");   // Address Service
    Characteristic<ObjectId>    chrId     (address, 0xA021, "na", "ID"); 
-   Characteristic<ObjectName>  chrName   (address, 0xA022, "na", "Name"); 
+   //Characteristic<ObjectName>  chrName   (address, 0xA022, "na", "Name"); 
    //Characteristic<ObjectName>   chrLayout (address, 0xA023, "na", "Layout"); 
 
       // here is the issue: if above declaration of the characteristic chrName
       // is being uncommented the GATT database will be corrupted. It has been 
       // found out by trial & error that below 'tedious' code is a fix.
-      
+/*      
    UserDescriptor(nameLayout,attLayout,dscLayout,"Layout")
    static ReadOnlyGattCharacteristic<ObjectName> _chrLayout(0xA023,ini.pObjectName(),0,dscLayout,1);   
 
    static GattCharacteristic *addressList[] = {&chrId,&chrName,&_chrLayout};
    static GattService _address(0xA020, addressList, GattListLength(addressList));
-
+*/
 // Debug Service
 
    Service debug(0xA030,"Debug");      // Debug Service
@@ -71,7 +71,7 @@
    void services(Blob &o)              // enroll all services & characteristics
    {
       enroll(o,detection);             // enroll Detection Service
-      enroll(o,_address,0xA020);       // enroll Address Service
+      enroll(o,address);               // enroll Address Service
       enroll(o,debug);                 // enroll Debug Service
       
       onWritten(o,cbWritten);          // setup 'data written' callback