BLE Library with custom services for the tortuga bike

Dependents:   TORTUGA_BLE

Fork of BLE_API by aapje monkey

Revision:
1206:8afbec0520f5
Parent:
1205:86f0783a5420
Child:
1207:da7745688342
--- a/ble/services/BikeService.h	Tue Jul 12 11:55:13 2016 +0000
+++ b/ble/services/BikeService.h	Fri Jul 15 12:49:23 2016 +0000
@@ -114,7 +114,6 @@
     
     void onDataWrittenCallback(const GattWriteCallbackParams *writeParams) {
         //when data is written in the controlCharacteristic
-        printf("data\n");
         if (writeParams->handle == controlChar.getValueHandle()) {
                 //performing different actions according to the written value
                 if (*(writeParams->data) == '1'){
@@ -152,20 +151,18 @@
  
     void update(){
         /*updating the different characteristics when the value has changed*/
-        
         uint32_t tmp;
         //TripData
         tmp = ((bd->getDataSet(BikeData::TRIP))->getDistance()) * 100;
         if (tmp != tripDistance){
             tripDistance = tmp;
             ble.gattServer().write(tripDistanceChar.getValueHandle(),(uint8_t *)&tripDistance,sizeof(uint32_t));
-        }        
+        }    
         tmp = ((bd->getDataSet(BikeData::TRIP))->getAverage()) * 100;
         if (tmp != tripAverage){
             tripAverage = tmp;
             ble.gattServer().write(tripAverageChar.getValueHandle(),(uint8_t *)&tripAverage,sizeof(uint32_t));
             }
-            
         tmp = ((bd->getDataSet(BikeData::TRIP))->getTime());
         if (tmp != tripTime){
             tripTime = tmp;