![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Changes done in ECG and BT
Dependencies: SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217
Fork of merged_code2_20sept_2017_4th_oct_2017 by
Diff: ecgg.cpp
- Revision:
- 56:89eb9a977641
- Parent:
- 55:057f4af9d581
--- a/ecgg.cpp Wed Oct 04 06:38:21 2017 +0000 +++ b/ecgg.cpp Fri Nov 03 07:16:44 2017 +0000 @@ -172,7 +172,8 @@ sprintf(buffer4, "/sd/%d_ECG_lpf.csv", pid); // For opening a specific file fpeecg1 = fopen(buffer4, "r"); -for(uint16_t i=100;i<=((N_ECG-4)-10);i++){ //loop started from 100 //4thoct nikita +for(uint16_t i=101;i<=((N_ECG-4)-10);i++) //loop started from 100 //4thoct nikita// loop started from 101//3rd nov skipping 100 samples, therefore starting from 101 +{ count++; rewind(fpeecg1); // Go to start of file each time fseek(fpeecg1, m, SEEK_CUR); // Update the count value according to move pointer //// after every calc. the pointer moves to 0th position, as we have used fseek, hence to make it jump to the respective position by "m" bytes this command is used @@ -194,11 +195,11 @@ pc.printf("peak value= %d\n",pk_val[j]); pk_pos[j]=i; // also save the peak's position pc.printf("peak position is = %d\n",pk_pos[j]); - i = i+120; // once confirmed that this is the necessary peak, skip the next 120 input values - n = j; // where n is the number of peaks detected + i = i+120; // once confirmed that this is the necessary peak, skip the next 120 input values + n = j; // where n is the number of peaks detected j = j+1; - m = m + 480; //similar reason to considering 28, but to skip 120 samples. this cond. is satisfied only when we hit a peak - suhasini_26thjune17 - + m = m + 484; //similar reason to considering 28, but to skip 120 samples. this cond. is satisfied only when we hit a peak - suhasini_26thjune17 + // as we are skipping 120 samples, the pointer should point to 121st sample // 3rd nov//nikita } else