Library for the Grove Earbud Heartrate Sensor
Dependents: BLE_Police_HRM_Earbud df-2014-salesforce-hrm-k64f BLE_HeartRate_ppm emoSound ... more
Diff: GroveEarbudSensor.cpp
- Revision:
- 12:8687d42d6798
- Parent:
- 11:30d8d0a456f3
--- 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 {