1
1
#include " protocentral_afe44xx.h"
2
2
#include " Protocentral_spo2_algorithm.h"
3
3
4
- static int32_t an_x[ BUFFER_SIZE];
5
- static int32_t an_y[ BUFFER_SIZE];
4
+ int32_t an_x[ BUFFER_SIZE];
5
+ int32_t an_y[ BUFFER_SIZE];
6
6
7
7
const uint8_t uch_spo2_table[184 ]={ 95 , 95 , 95 , 96 , 96 , 96 , 97 , 97 , 97 , 97 , 97 , 98 , 98 , 98 , 98 , 98 , 99 , 99 , 99 , 99 ,
8
8
99 , 99 , 99 , 99 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 , 100 ,
@@ -19,14 +19,15 @@ void spo2_algorithm :: estimate_spo2(uint16_t *pun_ir_buffer, int32_t n_ir_buffe
19
19
{
20
20
uint32_t un_ir_mean;
21
21
int32_t k, n_i_ratio_count;
22
- int32_t i, s, m, n_exact_ir_valley_locs_count, n_middle_idx;
23
- int32_t n_th1, n_npks, n_c_min ;
22
+ int32_t i, n_exact_ir_valley_locs_count, n_middle_idx;
23
+ int32_t n_th1, n_npks;
24
24
int32_t an_ir_valley_locs[15 ] ;
25
25
int32_t n_peak_interval_sum;
26
26
int32_t n_y_ac, n_x_ac;
27
27
int32_t n_spo2_calc;
28
28
int32_t n_y_dc_max, n_x_dc_max;
29
- int32_t n_y_dc_max_idx, n_x_dc_max_idx=0 ;
29
+ int32_t n_y_dc_max_idx=0 ;
30
+ int32_t =n_x_dc_max_idx=0 ;
30
31
int32_t an_ratio[5 ], n_ratio_average;
31
32
int32_t n_nume, n_denom ;
32
33
0 commit comments