Cycle speed and cadence example for the BLE API using nRF51822 native mode drivers

Dependencies:   BLE_API mbed nRF51822

Fork of BLE_HeartRate by Bluetooth Low Energy

Revision:
50:477004d54431
Parent:
47:430545f41113
Child:
52:6bbf62943106
diff -r 5dfc445d89cd -r 477004d54431 main.cpp
--- a/main.cpp	Wed Nov 05 14:15:20 2014 +0000
+++ b/main.cpp	Mon Nov 17 17:53:57 2014 +0000
@@ -70,7 +70,7 @@
     ble.startAdvertising();
 
     while (true) {
-        if (triggerSensorPolling) {
+        if (triggerSensorPolling && ble.getGapState().connected) {
             triggerSensorPolling = false;
 
             /* Do blocking calls or whatever is necessary for sensor polling. */