
Changes done in ECG and BT
Dependencies: SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217
Fork of merged_code2_20sept_2017_4th_oct_2017 by
Revision 35:43133f017ed4, committed 2017-07-29
- Comitter:
- avp2417
- Date:
- Sat Jul 29 10:38:05 2017 +0000
- Parent:
- 34:8f6b0dc124e8
- Child:
- 36:00d96aa14658
- Commit message:
- Added Rashmi's modification related to display reliability and display text
Changed in this revision
--- a/display_modules.cpp Sun Jul 23 16:50:59 2017 +0000 +++ b/display_modules.cpp Sat Jul 29 10:38:05 2017 +0000 @@ -60,7 +60,7 @@ TFT.locate(65,170) ; TFT.printf("CONFIG") ; TFT.fillrect( 60,230,180,300,Olive); - TFT.locate(90,250) ; + TFT.locate(88,252) ; //y :changed from 250 to 252 //x: changed from 90 to 88 //rashmi 22/7/17 //rashmi 22/7/17 TFT.printf("TEST") ; TFT.BusEnable(false) ; backlight = 1 ; @@ -115,14 +115,14 @@ TFT.set_font((unsigned char*) Arial24x23); TFT.foreground(Black); TFT.fillrect( 10,130,100,200,GreenYellow); - TFT.locate(40,160) ; - TFT.printf("BLE") ; + TFT.locate(38,160) ; //changed from 30 to 38 //rashmi 24/7/17 //changed from 40 to 30 //rashmi 22/7/17 + TFT.printf("BT") ; ////changed from BLE to BT //rashmi 24/7/17 TFT.fillrect( 130,130,220,200,GreenYellow); - TFT.locate(135,160) ; - TFT.printf("ERASE") ; + TFT.locate(145,160) ; //changed from 135 to 145 //rashmi 22/7/17 + TFT.printf("DEL") ; //changed from ERASE to DEL //rashmi 22/7/17 TFT.fillrect( 10,215,100,285,GreenYellow); - TFT.locate(30,245) ; - TFT.printf("FILE") ; + TFT.locate(22,245) ; //changed from 26 to 22 //rashmi 24/7/17 //changed from 30 to 26 //rashmi 22/7/17 + TFT.printf("P-Inf") ; TFT.fillrect(130,215,220,285,GreenYellow); TFT.locate(130,245) ; TFT.printf("HOME") ; @@ -132,7 +132,7 @@ void screen_ecg() //ECG screen 1 - { +{ backlight = 0 ; TFT.BusEnable(true) ; TFT.fillrect(10,130,100,200,White); @@ -148,12 +148,8 @@ TFT.locate(85,250) ; TFT.printf("MAIN") ; TFT.BusEnable(false) ; - backlight = 1 ; - - - - - } + backlight = 1 ; +} @@ -219,12 +215,12 @@ TFT.foreground(Black) ; // TFT.printf("RET") ; TFT.fillrect( 10,215,100,285,Green); - TFT.locate(30,245) ; + TFT.locate(20,245) ; //changed from 30 to 20 //rashmi 22/7/17 TFT.printf("MAIN") ; TFT.fillrect(130,215,220,285,Green); TFT.locate(155,235) ; // changed // points // 13/06 TFT.printf("RE-") ; - TFT.locate(145,255) ; + TFT.locate(140,255) ; //chnaged from 145 to 140 //rashmi 22/7/17 TFT.printf("TEST") ; TFT.BusEnable(false) ; backlight = 1 ; @@ -247,7 +243,7 @@ TFT.locate(80,150) ; TFT.printf("START") ; TFT.fillrect( 60,230,180,300,Green); - TFT.locate(100,250) ; + TFT.locate(90,250) ; //changed from 100 to 90 //rashmi 22/7/17 TFT.printf("MAIN") ; TFT.BusEnable(false) ; backlight = 1 ; @@ -314,10 +310,10 @@ TFT.locate(155,160) ; TFT.printf("PP") ; TFT.fillrect( 10,215,100,285,Green); - TFT.locate(20,245) ; + TFT.locate(23,245) ; //changed from 20 to 23 //rashmi 22/7/17 TFT.printf("RAN") ; TFT.fillrect(130,215,220,285,Green); - TFT.locate(155,245); + TFT.locate(145,245); //changed from 150 to 145 //rashmi 22/7/17 TFT.printf("MAIN") ; // TFT.fillrect( 60,230,180,300,Green); // TFT.locate(100,250) ; @@ -421,7 +417,7 @@ TFT.background(Green); //TFT.printf("RET") ; TFT.fillrect( 10,215,100,285,Green); - TFT.locate(30,245) ; + TFT.locate(25,245) ; // changed from 30 to 25 //rashmi 22/7/17 TFT.printf("MAIN") ; TFT.fillrect(130,215,220,285,Green); TFT.locate(155,235) ; // changed // points // 13/06 @@ -527,16 +523,16 @@ } void bat_screen_charge() - { - +{ // lcd.FillRect(10,10,20,40,COLOR_GREEN); - backlight = 0 ; + backlight = 0 ; TFT.BusEnable(true) ; - TFT.fillrect(10,10,20,40,Green); + TFT.fillrect(10,10,20,40,Green); TFT.BusEnable(false) ; backlight = 1 ; - } - void screen_ecg_error() +} + +void screen_ecg_error() { backlight = 0 ; TFT.BusEnable(true) ; @@ -571,17 +567,17 @@ } - void glc_error() +void glc_error() //glc replace test strip { backlight = 0 ; TFT.BusEnable(true) ; TFT.background(White) ; TFT.foreground(Red) ; TFT.fillrect(5,90,230,300,White); - TFT.locate(50,100) ; - TFT.printf("ERROR!") ; - TFT.locate(20,130) ; - TFT.printf("Take ReTest") ; + TFT.locate(60,100) ; //changed from 50 to 60 //rashmi 22/7/17 + TFT.printf("Replace") ; + TFT.locate(40,130) ; //changed from 20 to 40 //rashmi 22/7/17 + TFT.printf("Test Strip") ; //TFT.locate(45,160) ; // TFT.printf("") ; TFT.BusEnable(false) ; @@ -589,7 +585,7 @@ } - void BT_connection() +void BT_connection() { backlight = 0 ; TFT.BusEnable(true) ; @@ -659,17 +655,18 @@ void screen_patient_info(uint32_t current_test_pid,uint32_t bt_file_sent_pid) { + char buf[10]; - sprintf (buf, "current pid %d",current_test_pid); + sprintf (buf, "Test pid:%d",current_test_pid); //changed from 'current pid' to 'Test pid' //rashmi 24/7/17 backlight = 0 ; TFT.BusEnable(true) ; TFT.background(White); TFT.foreground(Blue); TFT.fillrect(5,90,230,300,White); - TFT.locate(20,140) ; - TFT.printf(buf) ; - sprintf (buf, "Bt pid %d",bt_file_sent_pid); - TFT.locate(20,170) ; + TFT.locate(15,140) ; //changed from 20 to 15 //rashmi 24/7/17 + TFT.printf(buf) ; + sprintf (buf,"BT pid :%d",bt_file_sent_pid); + TFT.locate(15,170) ; //changed from 20 to 15 //rashmi 24/7/17 TFT.printf(buf) ; TFT.background(Green) ; TFT.foreground(Black) ;
--- a/main.cpp Sun Jul 23 16:50:59 2017 +0000 +++ b/main.cpp Sat Jul 29 10:38:05 2017 +0000 @@ -335,7 +335,7 @@ glc(pid); // glc measurement // bt(); glc_flag=1; - wait(5); + wait(1); state1=0; screen_glc_2(); state=6;
--- a/touch_modules.cpp Sun Jul 23 16:50:59 2017 +0000 +++ b/touch_modules.cpp Sat Jul 29 10:38:05 2017 +0000 @@ -6,8 +6,8 @@ //InterruptIn Touch_D(PTD6); InterruptIn Touch_D(PTD2); int i; -unsigned int xt; -unsigned int yt; +unsigned int xt=0; +unsigned int yt=0; Serial kc(USBTX, USBRX); @@ -49,15 +49,15 @@ unsigned char touch_main() //determining the touch for home screen { - unsigned char state; + unsigned char state=0; - if ( ((xt >=SYSCFG_MAIN_X_MIN) && (xt<=SYSCFG_MAIN_X_MAX)) && ( (yt>=SYSCFG_MAIN_Y_MIN) && (yt<= SYSCFG_MAIN_Y_MAX) ) ) // system configuration + if ( ((xt >=SYSCFG_HOME_X_MIN) && (xt<=SYSCFG_HOME_X_MAX)) && ( (yt>=SYSCFG_HOME_Y_MIN) && (yt<= SYSCFG_HOME_Y_MAX) ) ) // system configuration { state=2; } - else if ( ((xt >=TEST_MAIN_X_MIN) && (xt<=TEST_MAIN_X_MAX)) && ( (yt>=TEST_MAIN_Y_MIN) && (yt<=TEST_MAIN_Y_MAX) ) ) // test + else if ( ((xt >=TEST_HOME_X_MIN) && (xt<=TEST_HOME_X_MAX)) && ( (yt>=TEST_HOME_Y_MIN) && (yt<=TEST_HOME_Y_MAX) ) ) // test { state=3; } @@ -71,21 +71,21 @@ unsigned char touch_main_1() //determining the touch for System Configuration screen { - unsigned char state; + unsigned char state=0; - if ( ((xt >=BLE_MAIN_X_MIN) && (xt<=BLE_MAIN_X_MAX)) && ( (yt>= BLE_MAIN_Y_MIN) && (yt<=BLE_MAIN_Y_MAX) ) ) // ble + if ( ((xt >=BT_MAIN_X_MIN) && (xt<=BT_MAIN_X_MAX)) && ( (yt>= BT_MAIN_Y_MIN) && (yt<=BT_MAIN_Y_MAX) ) ) // ble { state=12; } - else if ( ((xt >=ERASE_MAIN_X_MIN) && (xt<=ERASE_MAIN_X_MAX)) && ( (yt>=ERASE_MAIN_Y_MIN) && (yt<=ERASE_MAIN_Y_MAX) ) ) // erase + else if ( ((xt >=DELETE_MAIN_X_MIN) && (xt<=DELETE_MAIN_X_MAX)) && ( (yt>=DELETE_MAIN_Y_MIN) && (yt<=DELETE_MAIN_Y_MAX) ) ) // DELETE { // state=4; } - else if ( ((xt >=FILE_MAIN_X_MIN) && (xt<=FILE_MAIN_X_MAX)) && ( (yt>=FILE_MAIN_Y_MIN) && (yt<=FILE_MAIN_Y_MAX) ) ) // file + else if ( ((xt >=PATIENT_INFO_MAIN_X_MIN) && (xt<=PATIENT_INFO_MAIN_X_MAX)) && ( (yt>=PATIENT_INFO_MAIN_Y_MIN) && (yt<=PATIENT_INFO_MAIN_Y_MAX) ) ) // file { state=11; @@ -105,7 +105,7 @@ unsigned char touch_main_2() //determining the touch for TEST screen { - unsigned char state; + unsigned char state=0; if ( ((xt >=BG_MAIN_X_MIN) && (xt<=BG_MAIN_X_MAX)) && ( (yt>=BG_MAIN_Y_MIN) && (yt<=BG_MAIN_Y_MAX) ) ) // GLC { @@ -144,7 +144,7 @@ unsigned char touch_ecg() // determining the touch for ecg main screen { - unsigned char state; + unsigned char state=0; if ( ((xt >=START_MAIN_X_MIN) && (xt<=START_MAIN_X_MAX)) && ( (yt>=START_MAIN_Y_MIN) && (yt<=START_MAIN_Y_MAX) ) ) // START { @@ -165,7 +165,7 @@ unsigned char touch_ret() // determining the touch for ecg screen after the test { - unsigned char state; + unsigned char state=0; int8_t type=0; type=eprom_read_8(30); @@ -174,7 +174,7 @@ state=3; } - else if ( ((xt >=RETEST_MAIN_X_MIN) && (xt<=RETEST_MAIN_X_MAX)) && ( (yt>=RETEST_MAIN_Y_MIN) && (yt<=RETEST_MAIN_Y_MAX) ) ) // RETEST + else if ( ((xt >=RETEST_HOME_X_MIN) && (xt<=RETEST_HOME_X_MAX)) && ( (yt>=RETEST_HOME_Y_MIN) && (yt<=RETEST_HOME_Y_MAX) ) ) // RETEST { if (type==0) state=7; @@ -194,7 +194,7 @@ unsigned char touch_bp() // //determining the touch for bp main screen { - unsigned char state; + unsigned char state=0; if ( ((xt >=START_MAIN_X_MIN) && (xt<=START_MAIN_X_MAX)) && ( (yt>=START_MAIN_Y_MIN) && (yt<=START_MAIN_Y_MAX) ) ) // START { @@ -215,7 +215,7 @@ unsigned char touch_glc() //determining the touch for GLC screen { - unsigned char state; + unsigned char state=0; /* if ( ((xt >=70) && (xt<=170)) && ( (yt>= 140) && (yt<= 195) ) ) // START { @@ -248,7 +248,7 @@ eprom_write_16(20,2); } - else if ( ((xt >=HOME_MAIN_X_MIN) && (xt<=HOME_MAIN_X_MAX)) && ( (yt>=HOME_MAIN_Y_MIN) && (yt<=HOME_MAIN_Y_MAX) ) ) // return + else if ( ((xt >=BG_RET_MAIN_X_MIN) && (xt<=BG_RET_MAIN_X_MAX)) && ( (yt>=BG_RET_MAIN_Y_MIN) && (yt<=BG_RET_MAIN_Y_MAX) ) ) // return { state=3; ////////// @@ -266,7 +266,7 @@ unsigned char touch_again_ecg() //determining the touch for Repeat test { - unsigned char state; + unsigned char state=0; if ( ((xt >=YES_MAIN_X_MIN) && (xt<=YES_MAIN_X_MAX)) && ( (yt>=YES_MAIN_Y_MIN) && (yt<=YES_MAIN_Y_MAX) ) ) // YES { @@ -287,7 +287,7 @@ unsigned char touch_again_glc() //determining the touch for Repeat test { - unsigned char state; + unsigned char state=0; if ( ((xt >=YES_MAIN_X_MIN) && (xt<=YES_MAIN_X_MAX)) && ( (yt>=YES_MAIN_Y_MIN) && (yt<=YES_MAIN_Y_MAX) ) ) // YES { @@ -307,7 +307,7 @@ unsigned char touch_again_bp() //determining the touch for Repeat test { - unsigned char state; + unsigned char state=0; if ( ((xt >=YES_MAIN_X_MIN) && (xt<=YES_MAIN_X_MAX)) && ( (yt>=YES_MAIN_Y_MIN) && (yt<=YES_MAIN_Y_MAX) ) ) // YES { @@ -327,7 +327,7 @@ unsigned char BT_return() // //determining the touch for bp main screen { - unsigned char state; + unsigned char state=0; if ( ((xt >=MAIN_X_MIN) && (xt<=MAIN_X_MAX)) && ( (yt>=MAIN_Y_MIN) && (yt<=MAIN_Y_MAX) ) ) // RETURN { @@ -449,7 +449,4 @@ DigitalOut XL(PTC13); DigitalOut YU(PTC0); DigitalOut XR(PTB0); - } - - - \ No newline at end of file + } \ No newline at end of file
--- a/touch_modules.h Sun Jul 23 16:50:59 2017 +0000 +++ b/touch_modules.h Sat Jul 29 10:38:05 2017 +0000 @@ -6,100 +6,100 @@ #define X_MAX 240 #define Y_MAX 320 // touch co-ordinates// -#define SYSCFG_MAIN_X_MIN 110 -#define SYSCFG_MAIN_X_MAX 170 -#define SYSCFG_MAIN_Y_MIN 80 -#define SYSCFG_MAIN_Y_MAX 240 +#define SYSCFG_HOME_X_MIN 106 //SYSCFG_MAIN CHANGED TO SYSCFG_HOME 21/07/17 +#define SYSCFG_HOME_X_MAX 150 +#define SYSCFG_HOME_Y_MIN 90 +#define SYSCFG_HOME_Y_MAX 225 -#define TEST_MAIN_X_MIN 40 -#define TEST_MAIN_X_MAX 90 -#define TEST_MAIN_Y_MIN 160 -#define TEST_MAIN_Y_MAX 230 +#define TEST_HOME_X_MIN 53 //TEST_MAIN CHANGED TO TEST_HOME 21/07/17 +#define TEST_HOME_X_MAX 81 +#define TEST_HOME_Y_MIN 90 +#define TEST_HOME_Y_MAX 225 -#define BLE_MAIN_X_MIN 110 -#define BLE_MAIN_X_MAX 150 -#define BLE_MAIN_Y_MIN 70 -#define BLE_MAIN_Y_MAX 125 +#define BT_MAIN_X_MIN 110 //BLE_MAIN CHANGED TO BT_MAIN 21/07/17 +#define BT_MAIN_X_MAX 145 +#define BT_MAIN_Y_MIN 50 +#define BT_MAIN_Y_MAX 130 -#define ERASE_MAIN_X_MIN 110 -#define ERASE_MAIN_X_MAX 150 -#define ERASE_MAIN_Y_MIN 180 -#define ERASE_MAIN_Y_MAX 260 +#define DELETE_MAIN_X_MIN 110 //ERASE_MAIN CHANGED TO DELETE_MAIN 21/07/17 +#define DELETE_MAIN_X_MAX 145 +#define DELETE_MAIN_Y_MIN 180 +#define DELETE_MAIN_Y_MAX 260 -#define FILE_MAIN_X_MIN 60 -#define FILE_MAIN_X_MAX 90 -#define FILE_MAIN_Y_MIN 50 -#define FILE_MAIN_Y_MAX 100 +#define PATIENT_INFO_MAIN_X_MIN 60 //FILE CHANGED TO PATIENT_INFO 21/07/17 +#define PATIENT_INFO_MAIN_X_MAX 90 +#define PATIENT_INFO_MAIN_Y_MIN 50 +#define PATIENT_INFO_MAIN_Y_MAX 130 #define HOME_MAIN_X_MIN 60 -#define HOME_MAIN_X_MAX 100 -#define HOME_MAIN_Y_MIN 190 -#define HOME_MAIN_Y_MAX 300 +#define HOME_MAIN_X_MAX 90 +#define HOME_MAIN_Y_MIN 180 +#define HOME_MAIN_Y_MAX 260 #define BG_MAIN_X_MIN 110 -#define BG_MAIN_X_MAX 150 -#define BG_MAIN_Y_MIN 70 -#define BG_MAIN_Y_MAX 125 +#define BG_MAIN_X_MAX 140 +#define BG_MAIN_Y_MIN 50 +#define BG_MAIN_Y_MAX 130 #define ECG_MAIN_X_MIN 110 -#define ECG_MAIN_X_MAX 150 +#define ECG_MAIN_X_MAX 145 #define ECG_MAIN_Y_MIN 180 #define ECG_MAIN_Y_MAX 260 #define BP_MAIN_X_MIN 60 #define BP_MAIN_X_MAX 90 #define BP_MAIN_Y_MIN 50 -#define BP_MAIN_Y_MAX 100 +#define BP_MAIN_Y_MAX 130 -#define START_MAIN_X_MIN 110 +#define START_MAIN_X_MIN 106 #define START_MAIN_X_MAX 150 -#define START_MAIN_Y_MIN 100 -#define START_MAIN_Y_MAX 220 +#define START_MAIN_Y_MIN 90 +#define START_MAIN_Y_MAX 225 -#define MAIN_X_MIN 40 -#define MAIN_X_MAX 90 -#define MAIN_Y_MIN 160 -#define MAIN_Y_MAX 230 +#define MAIN_X_MIN 53 +#define MAIN_X_MAX 81 +#define MAIN_Y_MIN 90 +#define MAIN_Y_MAX 225 -#define RET_MAIN_X_MIN 60 -#define RET_MAIN_X_MAX 90 -#define RET_MAIN_Y_MIN 50 -#define RET_MAIN_Y_MAX 100 +#define BG_RET_MAIN_X_MIN 60 //RET_MAIN CHANGED TO BG_RET_MAIN 21/7/17 // MAIN IN BG SCREEN +#define BG_RET_MAIN_X_MAX 90 +#define BG_RET_MAIN_Y_MIN 180 +#define BG_RET_MAIN_Y_MAX 260 -#define RETEST_MAIN_X_MIN 60 -#define RETEST_MAIN_X_MAX 100 -#define RETEST_MAIN_Y_MIN 190 -#define RETEST_MAIN_Y_MAX 300 +#define RETEST_HOME_X_MIN 60 //RETEST ICON IN THE RESULT SCREEN +#define RETEST_HOME_X_MAX 90 +#define RETEST_HOME_Y_MIN 180 +#define RETEST_HOME_Y_MAX 260 #define FPS_MAIN_X_MIN 110 -#define FPS_MAIN_X_MAX 150 -#define FPS_MAIN_Y_MIN 70 -#define FPS_MAIN_Y_MAX 125 +#define FPS_MAIN_X_MAX 140 +#define FPS_MAIN_Y_MIN 50 +#define FPS_MAIN_Y_MAX 130 #define PP_MAIN_X_MIN 110 -#define PP_MAIN_X_MAX 150 +#define PP_MAIN_X_MAX 145 #define PP_MAIN_Y_MIN 180 #define PP_MAIN_Y_MAX 260 #define RANDOM_MAIN_X_MIN 60 #define RANDOM_MAIN_X_MAX 90 #define RANDOM_MAIN_Y_MIN 50 -#define RANDOM_MAIN_Y_MAX 100 +#define RANDOM_MAIN_Y_MAX 130 -#define RET_TEST_X_MIN 60 +#define RET_TEST_X_MIN 60 //MAIN ICON IN RESULT SCREEN #define RET_TEST_X_MAX 90 #define RET_TEST_Y_MIN 50 -#define RET_TEST_Y_MAX 100 +#define RET_TEST_Y_MAX 130 #define YES_MAIN_X_MIN 60 #define YES_MAIN_X_MAX 90 #define YES_MAIN_Y_MIN 50 -#define YES_MAIN_Y_MAX 100 +#define YES_MAIN_Y_MAX 130 #define NO_MAIN_X_MIN 60 -#define NO_MAIN_X_MAX 100 -#define NO_MAIN_Y_MIN 190 -#define NO_MAIN_Y_MAX 300 +#define NO_MAIN_X_MAX 90 +#define NO_MAIN_Y_MIN 180 +#define NO_MAIN_Y_MAX 260 unsigned char touch_main(); unsigned char touch_main_1();