Updated with option to return from BP screen to main screen, resolved screen navigation issues

Dependencies:   SDFileSystem TFTLCD_8bit ds3231 program mbed

Fork of poc_dis_5 by SenseSemi

Revision:
2:3b7b71bfc941
Parent:
1:8316c23ec6b9
Child:
3:9a06c2bed650
--- a/sdcard.cpp	Mon Jan 30 07:45:41 2017 +0000
+++ b/sdcard.cpp	Mon Jan 30 10:57:38 2017 +0000
@@ -17,13 +17,27 @@
   epoch_time1=rtc_read();
  // strftime(buffer, 32, "GLC_%s", pid);
   
- sprintf(buffer1,"/sd/GLC_%d.csv",pid);
+ sprintf(buffer1,"/sd/%d_GLC.csv",pid);
   fp = fopen(buffer1,"a"); 
   fprintf(fp,"%s\n",ctime(&epoch_time1) );
   
  
  }   
+  void sd_open_GLCfilee(int pid)
+ {
+     
+  char buffer[32];
+  char buffer1[32];
+  time_t  epoch_time1;
+  epoch_time1=rtc_read();
+ // strftime(buffer, 32, "GLC_%s", pid);
+  
+ sprintf(buffer1,"/sd/%d_GLC.csv",pid);
+  fp = fopen(buffer1,"a"); 
+   fprintf(fp,"PATIENT ID %d\n",pid);
+  
  
+ } 
   void sd_open_ECGfile(int pid)
  {
      
@@ -33,13 +47,28 @@
   epoch_time1=rtc_read();
   // strftime(buffer, 32, "ECG_%d", pid);
   
-  sprintf(buffer1,"/sd/ECG_%d.csv",pid);
+  sprintf(buffer1,"/sd/%d_ECG.csv",pid);
   fp = fopen(buffer1,"a"); 
   fprintf(fp,"%s\n",ctime(&epoch_time1) );
  // strftime(buffer, 32, "ECG_%d-%m-%Y_%H_%M",localtime(&epoch_time1));
  //  fprintf(fp,"%d\n",buffer ); 
  } 
  
+  void sd_open_ECGfilee(int pid)
+ {
+     
+ // char buffer[32];
+  char buffer1[32];
+  time_t  epoch_time1;
+  epoch_time1=rtc_read();
+  // strftime(buffer, 32, "ECG_%d", pid);
+  
+  sprintf(buffer1,"/sd/%d_ECG.csv",pid);
+  fp = fopen(buffer1,"a"); 
+  fprintf(fp,"PATIENT ID %d\n",pid );
+ // strftime(buffer, 32, "ECG_%d-%m-%Y_%H_%M",localtime(&epoch_time1));
+ //  fprintf(fp,"%d\n",buffer ); 
+ } 
   void sd_open_BPfile(int pid)
  {
      
@@ -49,7 +78,7 @@
   epoch_time1=rtc_read();
   // strftime(buffer, 32, "ECG_%d", pid);
   
-  sprintf(buffer1,"/sd/BP_%d.csv",pid);
+  sprintf(buffer1,"/sd/%d_BP.csv",pid);
   fp = fopen(buffer1,"a"); 
   fprintf(fp,"%s\n",ctime(&epoch_time1) );
  }