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:
36:00d96aa14658
Parent:
33:a80eed071fdc
Child:
44:05dbea558c9a
--- a/bt.cpp	Sat Jul 29 10:38:05 2017 +0000
+++ b/bt.cpp	Sat Jul 29 11:23:19 2017 +0000
@@ -9,7 +9,7 @@
 #define NACK 0xFF
 #define sos 0xc0
 #define eos 0xc0
-#define no_of_samples 150
+#define no_of_samples 600   //changed the buffer size from 150- 22/7/17- suhasini
 #include "eeprom_pgm.h"
 //#define len 6000
 
@@ -91,9 +91,12 @@
                    
        case 2:   total_samples=0;   
                  sd_read1(bt_file1);               // read the sd card file
+                 mc.printf("sd file opened to read data in it\n");
                  myBleMsg->bt_msg=bt_file1;         //copy the contents to the structure
                  send();                                // send the initial string
-                 blue.printf("\n");                       
+                 
+                 blue.printf("\n");   
+                 mc.printf("sent initial string\n");                    
                  total_samples= myBleMsg->bt_msg.num_samples.num_sample_ppg_dummy+myBleMsg->bt_msg.num_samples.num_sample_ecg_OTtyp;
                  
                  state_tx =0;
@@ -109,14 +112,14 @@
                      sd_read(v1,no_of_samples);      
                      counter=j+no_of_samples;               //read 1500 samples
                      send_data_str1(); 
+                     
                      for(file_start=j;file_start<(j+no_of_samples);file_start++)
                          {     
                        
                              blue.printf("%08x", v1[file_start]);
                            
                          }
-                         
-                         
+                          
                           check_sum=checksum((uint8_t *)v1,counter);               // calculating checksum            // calculating checksum
                           state_tx =0;
                           state_rx =3;
@@ -516,5 +519,4 @@
   chksum_datatrfr = sum & 0x000000FF;
  mc.printf("chksum_datatrfr=%02x\n",chksum_datatrfr);
   return chksum_datatrfr;
-}
-
+}
\ No newline at end of file