Tetsuro Tatsuoka
/
BH1792GLC_Eval
Measuring plethysmogram with BH1792GLC (Rohm Semiconductor) and calculating pulse rate
Diff: PulseRate.h
- Revision:
- 1:90f70c146a26
- Parent:
- 0:18d735a66926
diff -r 18d735a66926 -r 90f70c146a26 PulseRate.h --- a/PulseRate.h Mon Feb 05 20:22:14 2018 +0000 +++ b/PulseRate.h Mon Feb 05 21:28:19 2018 +0000 @@ -1,8 +1,8 @@ /** * @file PulseRate.h * @brief Header file for PulseRate.cpp - * @date 2018.02.03 - * @version 1.1.0 + * @date 2018.02.06 + * @version 1.1.1 */ #ifndef _INC_PulseRate #define _INC_PulseRate @@ -33,7 +33,12 @@ #define MV_LENGTH (5) /* Number of moving averaging for pulse detection */ #define TH_COEF (0.993) /* Coefficient for pulse threshold (exponential decline) */ + +#ifdef _OP_MODE_INT_AD #define PEAK_MIN (127) /* Ignore waveform as pulse under this value */ +#elif defined _OP_MODE_BH1792GLC +#define PEAK_MIN (63) /* Ignore waveform as pulse under this value */ +#endif #define PR_LENGTH (5) /* Number of average for pulse rate */ #define PR_1MIN_SPL (6000) /* Number of sampling for 1 minute (60*100) */ @@ -92,6 +97,7 @@ int32_t _pr; /* Pulse rate value */ bool _pr_flag; /* Pulse rate set flag */ + bool _sync_flag; /* Pulse sync sign flag */ /* Member functions */ void init();