Changes done in ECG and BT

Dependencies:   SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217

Fork of merged_code2_20sept_2017_4th_oct_2017 by nikita teggi

Revision:
40:f7f351699288
Parent:
39:69b09bd87502
Child:
41:1141a75eacc4
--- a/bp.cpp	Fri Aug 11 12:19:25 2017 +0000
+++ b/bp.cpp	Sun Aug 20 16:21:54 2017 +0000
@@ -16,6 +16,12 @@
 #include "bp.h"
 #include "display_modules.h"
 
+#define MAX_SBP_THRESHOLD 300
+#define MAX_DBP_THRESHOLD 300
+#define MIN_SBP_THRESHOLD 40
+#define MIN_DBP_THRESHOLD 40
+
+
 FILE *fpecg_bp; // file pointer in place of fpecg- Suhasini- 21/7/17
 FILE *fpppg1;
 
@@ -206,7 +212,7 @@
     BLEMsg_info_bp.cal_data.cal_sbp_dummy = (uint16_t) SBP;
     BLEMsg_info_bp.cal_data.cal_dbp_OTtyp = (uint16_t) DBP;
     
-     if((SBP>190 || SBP<70)  && (DBP>100 || DBP<40))              // checking for range below and above and then displaying error
+     if((SBP > MAX_SBP_THRESHOLD || SBP < MIN_SBP_THRESHOLD)  && (DBP > MAX_DBP_THRESHOLD || DBP < MIN_SBP_THRESHOLD))              // checking for range below and above and then displaying error
      {
         screen_bp_error();             // checking for error out of range- nikita 10-7-17
         del_ppg_ecg_BPfile(pid);                          // Copy ECG and PPG data to BP file