Mode1 Optical Validation

Dependencies:   max32630fthr

Revision:
51:e2214db671c0
Parent:
50:dd2f60ab5686
Child:
52:e5aba237e804
--- a/main.cpp	Tue May 03 02:06:40 2022 +0000
+++ b/main.cpp	Tue May 10 02:49:43 2022 +0000
@@ -85,7 +85,7 @@
 
 /*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*/
 // comment the two below if you want raw sensor+algo data
-#define ALGO_ONLY 1  // define this if you only want algo data
+//#define ALGO_ONLY 1  // define this if you only want algo data
 //#define RAW  // define this if you want AFE+accel data, no algorithm, tested on 33.13.31
   //#define RAW_HZ 25   // Raw data rate
   #define RAW_HZ 50   // Raw data rate
@@ -100,7 +100,7 @@
 //#define PCK_CFG_MASK  1 // define this and the above if you want to config mask out some of the packed data, 33.13.31
 //#define AGC 1 // define this for AGC, otherwise the default is AEC
 
-#define USE_SYN 1
+//#define USE_SYN 1
 
 //#define REDUCE_RPT_PERIOD 0x19  // Report samples every 25 frame.
 //#define USE_FIFO_BUFFER_CNT 5  // Allow the FIFO to accumulate this many samples
@@ -350,6 +350,7 @@
                 pc.printf("opmode,hr,hr_conf,ibi,ibi_conf,act,walk_stp,run_stp,energy,amr,");
                 pc.printf("iadj1_rqt,iadj1,iadj2_rqt,iadj2,iadj3_rqt,iadj3,intadj_rqt,intadj,");
                 pc.printf("smpladj_rqt,smpladj,rqt_smplave,afestatehr,hr_motion,scd,");
+                pc.printf("r,");
                 pc.printf("spo2,spo2_compl,spo2_lo,spo2_mo,spo2_lopi,spo2_unrel,spo2_state,ibi_offset,\n\r");
 #endif
             }
@@ -360,7 +361,7 @@
             pc.printf("%d,%d,%d,%d,", iadj2, iadj3_rqt, iadj3, intadj_rqt);
             pc.printf("%d,%d,%d,%d,", intadj, smpladj_rqt, smpladj, rqt_smplave);
             pc.printf("%d,%d,", afestatehr, hr_motion);
-            pc.printf("%d,",  scd);
+            pc.printf("%d,%d",  scd, r);
             pc.printf("%d,%d,%d,%d,", spo2, spo2_compl, spo2_lo, spo2_mo);
             pc.printf("%d,%d,%d,", spo2_lopi,spo2_unrel, spo2_state);
             pc.printf("%d,", ibi_offset);
@@ -371,7 +372,7 @@
                 pc.printf("hr,hr_conf,spo2,spo2_conf,spo2_lo,spo2_unrel,scd,\n\r");
 #endif
             }
-            pc.printf("%d,%d,", hr, hr_conf);
+            pc.printf("%d,%d,%d", hr, hr_conf, r);
             pc.printf("%d,%d,", spo2, spo2_conf);
             pc.printf("%d,%d,%d,", spo2_lo, spo2_mo, spo2_lopi);
             pc.printf("%d,%d,", spo2_unrel, scd);
@@ -437,10 +438,10 @@
             if (heading_printed == 0) {
                 heading_printed = 1;
      #if defined(ALGO_ONLY)
-                pc.printf("hr,hr_conf,spo2,spo2_conf,spo2_lo,spo2_unrel,scd,\n\r");
+                pc.printf("hr,hr_conf,r,spo2,spo2_conf,spo2_lo,spo2_unrel,scd,\n\r");
      #endif
             }
-            pc.printf("%d,%d,", hr, hr_conf);
+            pc.printf("%d,%d,%d", hr, hr_conf, r);
             pc.printf("%d,%d,", spo2, spo2_conf);
             pc.printf("%d,", spo2_lo);
             pc.printf("%d,%d,", spo2_unrel, scd);
@@ -489,10 +490,10 @@
             if (heading_printed == 0) {
                 heading_printed = 1;
 #if defined(ALGO_ONLY)
-                pc.printf("hr,hr_conf,spo2,spo2_conf,spo2_lo,spo2_unrel,scd,\n\r");
+                pc.printf("hr,hr_conf,r, spo2,spo2_conf,spo2_lo,spo2_unrel,scd,\n\r");
 #endif
             }
-            pc.printf("%d,%d,", hr, hr_conf);
+            pc.printf("%d,%d,%d,", hr, hr_conf, r);
             pc.printf("%d,%d,", spo2, spo2_conf);
             pc.printf("%d,", spo2_lo);
             pc.printf("%d,%d,", spo2_unrel, scd);