zinnet yazıcı
/
max30105Example
maxrefdes117
heartRate.h@0:78a2573ad768, 2019-08-06 (annotated)
- Committer:
- zinnetyazicii53
- Date:
- Tue Aug 06 12:19:46 2019 +0000
- Revision:
- 0:78a2573ad768
commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
zinnetyazicii53 | 0:78a2573ad768 | 1 | #include "mbed.h" |
zinnetyazicii53 | 0:78a2573ad768 | 2 | |
zinnetyazicii53 | 0:78a2573ad768 | 3 | #ifndef HEARTRATE_H_ |
zinnetyazicii53 | 0:78a2573ad768 | 4 | #define HEARTRATE_H_ |
zinnetyazicii53 | 0:78a2573ad768 | 5 | |
zinnetyazicii53 | 0:78a2573ad768 | 6 | |
zinnetyazicii53 | 0:78a2573ad768 | 7 | class heartRate { |
zinnetyazicii53 | 0:78a2573ad768 | 8 | public: |
zinnetyazicii53 | 0:78a2573ad768 | 9 | bool checkForBeat(int32_t sample); |
zinnetyazicii53 | 0:78a2573ad768 | 10 | int16_t averageDCEstimator(int32_t *p, uint16_t x); |
zinnetyazicii53 | 0:78a2573ad768 | 11 | int16_t lowPassFIRFilter(int16_t din); |
zinnetyazicii53 | 0:78a2573ad768 | 12 | int32_t mul16(int16_t x, int16_t y); |
zinnetyazicii53 | 0:78a2573ad768 | 13 | |
zinnetyazicii53 | 0:78a2573ad768 | 14 | private: |
zinnetyazicii53 | 0:78a2573ad768 | 15 | |
zinnetyazicii53 | 0:78a2573ad768 | 16 | /*int16_t IR_AC_Max = 20; |
zinnetyazicii53 | 0:78a2573ad768 | 17 | int16_t IR_AC_Min = -20; |
zinnetyazicii53 | 0:78a2573ad768 | 18 | |
zinnetyazicii53 | 0:78a2573ad768 | 19 | int16_t IR_AC_Signal_Current = 0; |
zinnetyazicii53 | 0:78a2573ad768 | 20 | int16_t IR_AC_Signal_Previous; |
zinnetyazicii53 | 0:78a2573ad768 | 21 | int16_t IR_AC_Signal_min = 0; |
zinnetyazicii53 | 0:78a2573ad768 | 22 | int16_t IR_AC_Signal_max = 0; |
zinnetyazicii53 | 0:78a2573ad768 | 23 | int16_t IR_Average_Estimated; |
zinnetyazicii53 | 0:78a2573ad768 | 24 | |
zinnetyazicii53 | 0:78a2573ad768 | 25 | int16_t positiveEdge = 0; |
zinnetyazicii53 | 0:78a2573ad768 | 26 | int16_t negativeEdge = 0; |
zinnetyazicii53 | 0:78a2573ad768 | 27 | int32_t ir_avg_reg = 0; |
zinnetyazicii53 | 0:78a2573ad768 | 28 | |
zinnetyazicii53 | 0:78a2573ad768 | 29 | int16_t cbuf[32]; |
zinnetyazicii53 | 0:78a2573ad768 | 30 | uint8_t offset = 0; |
zinnetyazicii53 | 0:78a2573ad768 | 31 | static const uint16_t FIRCoeffs[12] = {172, 321, 579, 927, 1360, 1858, 2390, 2916, 3391, 3768, 4012, 4096};*/ |
zinnetyazicii53 | 0:78a2573ad768 | 32 | |
zinnetyazicii53 | 0:78a2573ad768 | 33 | |
zinnetyazicii53 | 0:78a2573ad768 | 34 | }; |
zinnetyazicii53 | 0:78a2573ad768 | 35 | |
zinnetyazicii53 | 0:78a2573ad768 | 36 | #endif |