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:
- 55:057f4af9d581
- Parent:
- 54:f2a413d5dffd
- Child:
- 56:89eb9a977641
--- a/ecgg.cpp Wed Sep 27 09:36:26 2017 +0000 +++ b/ecgg.cpp Wed Oct 04 06:38:21 2017 +0000 @@ -126,7 +126,7 @@ uint32_t samp_10 = 28; - static int32_t hi_val; //changed from uint32_t to static double- by Suhasini- 5-8-17 + int32_t hi_val; //changed from uint32_t to static double- by Suhasini- 5-8-17 //4thoct nikita non static int32_t pk_val[20]; //changed from uint32_t to double - Suhasini - 5-8-17 int32_t hi_dif = 0; //diff between high value and it's consecutive value //changed from uint32_t to static double- by Suhasini- 5-8-17 uint16_t pk_pos[20]= {0}; // Variable to hold pointer positio @@ -172,7 +172,7 @@ sprintf(buffer4, "/sd/%d_ECG_lpf.csv", pid); // For opening a specific file fpeecg1 = fopen(buffer4, "r"); -for(uint16_t i=0;i<((N_ECG-4)-10);i++){ +for(uint16_t i=100;i<=((N_ECG-4)-10);i++){ //loop started from 100 //4thoct nikita 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 @@ -277,7 +277,7 @@ { FILE *fpecg1; // FILE pointer to read raw data ECG file added by Suhasini 5-8-17 FILE *fpeecg_lpf; // FILE pointer to read and write into LPF output file added by Suhasini 5-8-17 - static uint32_t ecg_raw_temp[5]; // changed by rohit on 13 sep + // uint32_t ecg_raw_temp[5]; // changed by rohit on 13 sep uint32_t ecg_raw[5]; // Buff of 5 samples created to Stores input samples for LPF added by Suhasini - 5-8-17 added by rohit uint32_t lpf_op[5]= {0.0}; // for LPF output added by Suhasini - 5-8-17 // changed from double to int32_t- 16-8-17 added by rohit @@ -304,7 +304,7 @@ fread(&ecg_raw, sizeof(uint32_t), 5, fpecg1); // pc.printf("first 4 RAW data %d\n %d\n %d\n %d\n %d\n", ecg_raw[0],ecg_raw[1],ecg_raw[2],ecg_raw[3],ecg_raw[4]); - for (uint16_t i = 1; i < (N_ECG-4); i++) { // reduced loop length to check i/p and o/p timing + for (uint16_t i = 1; i <= (N_ECG-4); i++) { // reduced loop length to check i/p and o/p timing //4thoct nikita<= //fseek(fpecg1, lpf_4samp, SEEK_CUR); // Update the count value according to move pointer // fread(&ecg_raw, sizeof(uint32_t), 5, fpecg1); // Read sample 1 of i/p