diff --git a/lib/vendor/Maxim/rd117_mbed/RD117_MBED/algorithm/algorithm.c b/lib/vendor/Maxim/rd117_mbed/RD117_MBED/algorithm/algorithm.c index b42b941a269f654efe2bd1ed405f17a13347afef..52764522c32cf577de9656179f8b84d3a0863e95 100644 --- a/lib/vendor/Maxim/rd117_mbed/RD117_MBED/algorithm/algorithm.c +++ b/lib/vendor/Maxim/rd117_mbed/RD117_MBED/algorithm/algorithm.c @@ -168,7 +168,9 @@ void maxim_heart_rate_and_oxygen_saturation(uint32_t *pun_ir_buffer, int32_t n_ } n_th1= n_th1/ ( BUFFER_SIZE-HAMMING_SIZE); // peak location is acutally index for sharpest location of raw signal since we flipped the signal - maxim_find_peaks( an_dx_peak_locs, &n_npks, an_dx, BUFFER_SIZE-HAMMING_SIZE, n_th1, 8, 5 );//peak_height, peak_distance, max_num_peaks + // 100 sps / (200 bpm / 60 spm) + int n_min_distance = 100. / (200. / 60.); + maxim_find_peaks( an_dx_peak_locs, &n_npks, an_dx, BUFFER_SIZE-HAMMING_SIZE, n_th1, n_min_distance, 5 );//peak_height, peak_distance, max_num_peaks n_peak_interval_sum =0; if (n_npks>=2){