Library for the Grove Earbud Heartrate Sensor

Dependents:   BLE_Police_HRM_Earbud df-2014-salesforce-hrm-k64f BLE_HeartRate_ppm emoSound ... more

Files at this revision

API Documentation at this revision

Comitter:
ansond
Date:
Thu Mar 19 04:04:59 2015 +0000
Parent:
11:30d8d0a456f3
Commit message:
updates for k64f hrm

Changed in this revision

GroveEarbudSensor.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 30d8d0a456f3 -r 8687d42d6798 GroveEarbudSensor.cpp
--- a/GroveEarbudSensor.cpp	Wed Mar 11 20:27:28 2015 +0000
+++ b/GroveEarbudSensor.cpp	Thu Mar 19 04:04:59 2015 +0000
@@ -144,11 +144,11 @@
         this->m_timer->stop();
         this->m_timer->start();
     }
-    if (this->m_counter == (NUM_SLOTS-1) && this->m_data_effect) {
+    if (this->m_counter >= (NUM_SLOTS-1) && this->m_data_effect) {
         this->m_counter = 0;
         this->sumAndInvokeCallback();
     }
-    else if(this->m_counter != (NUM_SLOTS-1) && this->m_data_effect) {
+    else if(this->m_counter < (NUM_SLOTS-1) && this->m_data_effect) {
         this->m_counter++;
     }
     else {