created separate function for hex to char

Dependencies:   SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217

Fork of SS_SensePOC2P0_11Dec2017_USERPID by rashmi v

Revision:
54:f2a413d5dffd
Parent:
51:1a4693774b60
Child:
55:057f4af9d581
--- a/ecgg.cpp	Wed Sep 20 11:02:08 2017 +0000
+++ b/ecgg.cpp	Wed Sep 27 09:36:26 2017 +0000
@@ -135,7 +135,7 @@
   
     // ------------------------- Declaration for Heart Rate calculation --------------------------
  uint8_t n=0;
-    float pos_dif;                                                              // changed from float to uint16_t- Suhasini- 8-8-17, changed back to float- 17th aug,2017
+    uint16_t pos_dif;                                                              // changed from float to uint16_t- Suhasini- 8-8-17, changed back to float- 17th aug,2017
     float HR[10],HR1,t_pos_dif;
     uint8_t t_sec = 60;
     float HR_sum = 0,HR_avg;
@@ -222,7 +222,7 @@
  {
   pos_dif = pk_pos[i+1] - pk_pos[i];                 // difference between two consequtive peaks
   pc.printf("peak position diff is = %d\n",pos_dif);
-  t_pos_dif = pos_dif/fs;                           // sample difference between peak positions divided by sampling frequency gives the difference value in terms of actual time
+  t_pos_dif = (float)pos_dif/fs;                           // sample difference between peak positions divided by sampling frequency gives the difference value in terms of actual time
   pc.printf("time in seconds is = %f\n",t_pos_dif);
   HR[i] = t_sec/t_pos_dif;                          //HR calculation
   pc.printf("Heart Rate is = %f\n",HR[i]);
@@ -278,8 +278,8 @@
     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 
-    static uint32_t ecg_raw[5];                                                 // Buff of 5 samples created to Stores input samples for LPF  added by Suhasini - 5-8-17
-    static 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
+     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
 
     uint32_t lpf_4samp = 0;                                                     // Variable to move 16 samples back from current in input file - changed by Suhasini- 5-8-17
     char buffer3[32];