Changes done in ECG and BT
Dependencies: SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217
Fork of merged_code2_20sept_2017_4th_oct_2017 by
Revision 56:89eb9a977641, committed 2017-11-03
- Comitter:
- nikitateggi
- Date:
- Fri Nov 03 07:16:44 2017 +0000
- Parent:
- 55:057f4af9d581
- Commit message:
- Changes done in ECG and BT
Changed in this revision
bt.cpp | Show annotated file Show diff for this revision Revisions of this file |
ecgg.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 057f4af9d581 -r 89eb9a977641 bt.cpp --- a/bt.cpp Wed Oct 04 06:38:21 2017 +0000 +++ b/bt.cpp Fri Nov 03 07:16:44 2017 +0000 @@ -56,7 +56,7 @@ file_pointer_position=0; bt_pid = get_btpid()+1; //added on 22/09/2017 nikita mc.printf("bt_pid = %d\n",get_btpid()); - if(get_filepid()>bt_pid) //check for pid and bluetooth pid by reading from file + if(get_filepid()>=bt_pid) //check for pid and bluetooth pid by reading from file// modified to send till the current pid, 3rd nov// { send_initial_string(); blue.printf("\n");
diff -r 057f4af9d581 -r 89eb9a977641 ecgg.cpp --- 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