Sfoglia il codice sorgente

fix:max30102 idf编译报错

Dozingfiretruck 3 anni fa
parent
commit
96bb54bb43
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      components/max30102/algorithm.c
  2. 1 1
      luat/include/luat_libs.h

+ 1 - 1
components/max30102/algorithm.c

@@ -106,7 +106,7 @@ void maxim_heart_rate_and_oxygen_saturation(uint32_t *pun_ir_buffer,  int32_t n_
     int32_t n_y_ac, n_x_ac;
     int32_t n_y_ac, n_x_ac;
     int32_t n_spo2_calc; 
     int32_t n_spo2_calc; 
     int32_t n_y_dc_max, n_x_dc_max; 
     int32_t n_y_dc_max, n_x_dc_max; 
-    int32_t n_y_dc_max_idx, n_x_dc_max_idx; 
+    int32_t n_y_dc_max_idx = 0, n_x_dc_max_idx = 0; 
     int32_t an_ratio[5],n_ratio_average; 
     int32_t an_ratio[5],n_ratio_average; 
     int32_t n_nume,  n_denom ;
     int32_t n_nume,  n_denom ;
     // remove DC of ir signal    
     // remove DC of ir signal    

+ 1 - 1
luat/include/luat_libs.h

@@ -144,5 +144,5 @@ LUAMOD_API int luaopen_sms( lua_State *L );
 LUAMOD_API int luaopen_errdump( lua_State *L );
 LUAMOD_API int luaopen_errdump( lua_State *L );
 LUAMOD_API int luaopen_profiler( lua_State *L );
 LUAMOD_API int luaopen_profiler( lua_State *L );
 LUAMOD_API int luaopen_fskv( lua_State *L );
 LUAMOD_API int luaopen_fskv( lua_State *L );
-
+LUAMOD_API int luaopen_max30102( lua_State *L );
 #endif
 #endif