Skip to content

Commit

Permalink
Merge pull request #10 from SaulinPav/master
Browse files Browse the repository at this point in the history
Fixed some compile issues
  • Loading branch information
nseidle authored Mar 4, 2018
2 parents 26521f4 + a72243b commit f109ec3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/spo2_algorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void maxim_heart_rate_and_oxygen_saturation(uint16_t *pun_ir_buffer, int32_t n_i
int32_t *pn_heart_rate, int8_t *pch_hr_valid)
#else
void maxim_heart_rate_and_oxygen_saturation(uint32_t *pun_ir_buffer, int32_t n_ir_buffer_length, uint32_t *pun_red_buffer, int32_t *pn_spo2, int8_t *pch_spo2_valid,
//int32_t *pn_heart_rate, int8_t *pch_hr_valid)
int32_t *pn_heart_rate, int8_t *pch_hr_valid)
#endif
/**
* \brief Calculate the heart rate and SpO2 level
Expand Down Expand Up @@ -131,7 +131,7 @@ void maxim_heart_rate_and_oxygen_saturation(uint32_t *pun_ir_buffer, int32_t n_i
if (n_npks>=2){
for (k=1; k<n_npks; k++) n_peak_interval_sum += (an_ir_valley_locs[k] -an_ir_valley_locs[k -1] ) ;
n_peak_interval_sum =n_peak_interval_sum/(n_npks-1);
*pn_heart_rate =(int32_t)( (FS*60)/ n_peak_interval_sum );
*pn_heart_rate =(int32_t)( (FreqS*60)/ n_peak_interval_sum );
*pch_hr_valid = 1;
}
else {
Expand Down
4 changes: 2 additions & 2 deletions src/spo2_algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@

#include <Arduino.h>

#define FS 25 //sampling frequency
#define BUFFER_SIZE (FS * 4)
#define FreqS 25 //sampling frequency
#define BUFFER_SIZE (FreqS * 4)
#define MA4_SIZE 4 // DONOT CHANGE
//#define min(x,y) ((x) < (y) ? (x) : (y)) //Defined in Arduino.h

Expand Down

0 comments on commit f109ec3

Please sign in to comment.