Oscar Ariza / BLE_API

Fork of BLE_API by Bluetooth Low Energy

Revision:
255:80135bd6a519
Parent:
242:0e9201b67e2f
--- a/services/HeartRateService.h	Tue Dec 09 08:18:11 2014 +0000
+++ b/services/HeartRateService.h	Tue Feb 16 13:58:09 2016 +0000
@@ -115,9 +115,13 @@
      * This callback allows the HeartRateService to receive updates to the
      * controlPoint Characteristic.
      *
+     * @param[in] params
+     *     Information about the characterisitc being updated.
      */
-    virtual void onDataWritten(const GattCharacteristicWriteCBParams *params) {
-        if (params->charHandle == controlPoint.getValueAttribute().getHandle()) {
+    virtual void onDataWritten(const GattCharacteristicWriteCBParams *params) 
+    {
+        if (params->charHandle == controlPoint.getValueAttribute().getHandle()) 
+        {
             /* Do something here if the new value is 1; else you can override this method by
              * extending this class.
              * @NOTE: if you are extending this class, be sure to also call
@@ -128,7 +132,8 @@
     }
 
 private:
-    void setupService(void) {
+    void setupService(void) 
+    {
         static bool serviceAdded = false; /* We should only ever need to add the heart rate service once. */
         if (serviceAdded) {
             return;
@@ -190,12 +195,12 @@
     };
 
 private:
-    BLEDevice           &ble;
+    BLEDevice            &ble;
     HeartRateValueBytes  valueBytes;
-    uint8_t              controlPointValue;
     GattCharacteristic   hrmRate;
     GattCharacteristic   hrmLocation;
     GattCharacteristic   controlPoint;
+    uint8_t              controlPointValue;
 };
 
 #endif /* #ifndef __BLE_HEART_RATE_SERVICE_H__*/
\ No newline at end of file