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

Files at this revision

API Documentation at this revision

Comitter:
suhasini
Date:
Sat Apr 01 06:37:02 2017 +0000
Parent:
5:a3ea7c82b7e1
Child:
7:11f926351d8f
Commit message:
Has all three functionalities-ECG, BG, BP and have resolved jumping issue. Have added return functionality from BP and SYS_CONFIG screens.; But still facing "hanging issue" whenever BP test is performed first.

Changed in this revision

display_modules.cpp Show annotated file Show diff for this revision Revisions of this file
display_modules.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
touch_modules.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/display_modules.cpp	Thu Mar 30 11:34:04 2017 +0000
+++ b/display_modules.cpp	Sat Apr 01 06:37:02 2017 +0000
@@ -47,8 +47,8 @@
                 lcd.FillRect(5,20,250,150,COLOR_BLACK); 
                //lcd.Print( "SenseSmart", CENTER, 95);
                 sprintf(buff2 ,"%d", pid);
-                lcd.Print( "PATIENT ID",20,50,COLOR_YELLOW,COLOR_BLACK, 0);
-                lcd.Print(buff2,200,50,COLOR_YELLOW,COLOR_BLACK, 0);
+                lcd.Print( "PATIENTID",20,50,COLOR_YELLOW,COLOR_BLACK, 0);           /////////
+                lcd.Print(buff2,170,50,COLOR_YELLOW,COLOR_BLACK, 0);
                 
                 lcd.SetFont(&TerminusBigFont);
                // lcd.FillRect(5,120,230,320,COLOR_BLACK); 
@@ -202,7 +202,26 @@
       
   }                
   
-  
+   void bp_countdown()   // ECG measurement countdown 
+ {    
+     char tim1[5];
+     
+         // lcd.DrawRect(20,90,90,40,COLOR_BLACK);
+         // lcd.FillRect(5,127,230,320,COLOR_BLACK); 
+        lcd.FillRoundRect(3,130,200,200,COLOR_BLACK);
+        lcd.FillRoundRect(60,230,180,300,COLOR_BLACK);
+        lcd.FillRect(5,215,230,290,COLOR_BLACK);
+        lcd.Print( "BP starts in", CENTER, 95);
+    for(int i=5;i>=0;i--)
+            {
+                wait(1);
+                sprintf (tim1, "%d",i);
+                lcd.Print( tim1,120,120,COLOR_YELLOW,COLOR_BLACK, 0);
+            }
+            
+        lcd.Print( "Tst in Progres",3,150,COLOR_GREEN,COLOR_BLACK,0);
+      
+  } 
   
  void screen_again()    // screen to press 'yes' or 'no' to repeat the test 
  {
--- a/display_modules.h	Thu Mar 30 11:34:04 2017 +0000
+++ b/display_modules.h	Sat Apr 01 06:37:02 2017 +0000
@@ -12,6 +12,7 @@
 void init_screen();
 void screen_ecg_2();
 void ecg_countdown();
+void bp_countdown();
 void glc_1();
 void glc_2();
 void glc_3();
--- a/main.cpp	Thu Mar 30 11:34:04 2017 +0000
+++ b/main.cpp	Sat Apr 01 06:37:02 2017 +0000
@@ -215,9 +215,11 @@
      
      case 6:   DisableTouch();
                screen_bp();          // bp main screen
-               EnableTouch();
+               //EnableTouch();
                 state1=0;
                 state=8;
+                nstate=state;         ///////
+                EnableTouch();        ///////
                 break;
      
      
@@ -232,6 +234,7 @@
                 screen_glc_2();
                  state=6;;
               //  gc.printf("%d", state);
+              nstate=state;         //////////////
                EnableTouch();
                 break;
     
@@ -260,6 +263,7 @@
      case 9: 
                 DisableTouch();
                 screen_bp2();      // bp main screen
+                bp_countdown();    // countdown for bp 
                 bp();              // measuring bp   
                 state1=0;
                // wait(1);
--- a/touch_modules.cpp	Thu Mar 30 11:34:04 2017 +0000
+++ b/touch_modules.cpp	Sat Apr 01 06:37:02 2017 +0000
@@ -91,7 +91,7 @@
                        }
                  else if ( ((xt >= 130) && (xt<=195)) && ( (yt>= 65) && (yt<= 118) ) ) // home
                        {
-                                 //state=6;
+                                 state=1;         //////////
                         
                        }
                    else