created separate function for hex to char

Dependencies:   SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217

Fork of SS_SensePOC2P0_11Dec2017_USERPID by rashmi v

Committer:
nikitateggi
Date:
Fri Sep 15 19:44:48 2017 +0000
Revision:
49:3ff80c4bc1be
Parent:
45:067673dae242
Child:
51:1a4693774b60
Merged code -2; it includes sd card read, delete , entering into the debug mode and lpf for ecg - need to be tested

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nikitateggi 0:c47fb0c1bbf6 1 #include "mbed.h"
nikitateggi 0:c47fb0c1bbf6 2 #include "display_modules.h"
nikitateggi 0:c47fb0c1bbf6 3 #include "touch_modules.h"
nikitateggi 1:8316c23ec6b9 4 #include "rtc.h"
nikitateggi 49:3ff80c4bc1be 5 #include "main.h"
nikitateggi 29:7edc76b15e3d 6 #include "ILI9341.h"
nikitateggi 29:7edc76b15e3d 7 //#include <ILI932x.h>
nikitateggi 7:11f926351d8f 8 #include "Arial12x12.h"
nikitateggi 7:11f926351d8f 9 #include "Arial24x23.h"
nikitateggi 7:11f926351d8f 10 //#include "Terminal6x8.h"
nikitateggi 7:11f926351d8f 11 //#include "Arial43x48_numb.h"
nikitateggi 0:c47fb0c1bbf6 12
nikitateggi 0:c47fb0c1bbf6 13
nikitateggi 7:11f926351d8f 14 //BusOut dataBus( PTC12, PTC13, PTB10, PTC9, PTD4, PTD5, PTD6, PTD7 ); // 16 pins//POC DISPALY 240*320 pixels
nikitateggi 7:11f926351d8f 15 //ILI9325_LCD lcd( PTC5, PTB9, PTC0, PTB0, &dataBus, NC, PTE31);
nikitateggi 0:c47fb0c1bbf6 16
nikitateggi 29:7edc76b15e3d 17 /*PinName buspins[8]={PTC12, PTC13, PTB10, PTC9, PTD4, PTD5, PTD6, PTD7 };
nikitateggi 21:7ef1b0b40841 18 ILI932x TFT(BUS_8, buspins, PTC5, PTB9, PTC0, PTB0,PTE31,"SPFD5408_2.4") ;
nikitateggi 29:7edc76b15e3d 19 DigitalOut backlight(PTC9) ;*/
nikitateggi 29:7edc76b15e3d 20
nikitateggi 29:7edc76b15e3d 21 PinName buspins[8]={PTD2, PTC13, PTB10, PTC9, PTD4, PTD5, PTD6, PTD7 }; //new_display ili9341
nikitateggi 29:7edc76b15e3d 22 ILI9341 TFT(BUS_8, buspins, PTB0, PTB9, PTC0, PTB8,PTE31,"SPFD5408_2.4") ;
nikitateggi 7:11f926351d8f 23 DigitalOut backlight(PTC9) ;
nikitateggi 0:c47fb0c1bbf6 24
nikitateggi 1:8316c23ec6b9 25 void init_screen() // initializing the screen
nikitateggi 1:8316c23ec6b9 26 {
nikitateggi 7:11f926351d8f 27 //Configure the display driver
nikitateggi 7:11f926351d8f 28 TFT.FastWindow(true) ;
nikitateggi 7:11f926351d8f 29 TFT.background(Black);
nikitateggi 7:11f926351d8f 30 TFT.foreground(White);
nikitateggi 7:11f926351d8f 31 wait(0.01) ;
nikitateggi 7:11f926351d8f 32 TFT.cls();
nikitateggi 1:8316c23ec6b9 33 }
nikitateggi 0:c47fb0c1bbf6 34
nikitateggi 4:6bd81bb1790d 35 void screen_main() //main screen
nikitateggi 0:c47fb0c1bbf6 36 {
nikitateggi 7:11f926351d8f 37 char buff1[32];
nikitateggi 7:11f926351d8f 38 time_t epoch_time;
nikitateggi 7:11f926351d8f 39 epoch_time=rtc_read(); // read the time from rtc module
nikitateggi 7:11f926351d8f 40 strftime(buff1, 32, "%d-%m-%Y %H:%M",localtime(&epoch_time));
nikitateggi 7:11f926351d8f 41 backlight = 0 ;
nikitateggi 7:11f926351d8f 42 TFT.BusEnable(true) ;
nikitateggi 7:11f926351d8f 43 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 44 TFT.cls() ;
nikitateggi 20:7c64e6ecad76 45 wait(0.1) ;
nikitateggi 7:11f926351d8f 46 TFT.set_font((unsigned char*) Arial12x12);
nikitateggi 7:11f926351d8f 47 TFT.foreground(Red);
nikitateggi 7:11f926351d8f 48 TFT.locate(20,100) ;
nikitateggi 20:7c64e6ecad76 49 TFT.printf(buff1);
nikitateggi 20:7c64e6ecad76 50 TFT.set_font((unsigned char*) Arial24x23);
nikitateggi 20:7c64e6ecad76 51 TFT.foreground(Black);
nikitateggi 45:067673dae242 52 TFT.locate(35,30) ;
nikitateggi 7:11f926351d8f 53 TFT.printf("SENSESEMI") ;
nikitateggi 7:11f926351d8f 54 TFT.locate(45,60) ;
nikitateggi 20:7c64e6ecad76 55 TFT.printf("Sense POC") ;
nikitateggi 20:7c64e6ecad76 56 TFT.background(Olive) ;
nikitateggi 20:7c64e6ecad76 57 TFT.fillrect( 60,130,180,200,Olive);
nikitateggi 20:7c64e6ecad76 58 TFT.locate(100,140) ;
nikitateggi 7:11f926351d8f 59 TFT.printf("SYS") ;
nikitateggi 20:7c64e6ecad76 60 TFT.locate(65,170) ;
nikitateggi 7:11f926351d8f 61 TFT.printf("CONFIG") ;
nikitateggi 20:7c64e6ecad76 62 TFT.fillrect( 60,230,180,300,Olive);
avp2417 35:43133f017ed4 63 TFT.locate(88,252) ; //y :changed from 250 to 252 //x: changed from 90 to 88 //rashmi 22/7/17 //rashmi 22/7/17
nikitateggi 20:7c64e6ecad76 64 TFT.printf("TEST") ;
nikitateggi 7:11f926351d8f 65 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 66 backlight = 1 ;
nikitateggi 3:9a06c2bed650 67
nikitateggi 3:9a06c2bed650 68 }
nikitateggi 1:8316c23ec6b9 69
nikitateggi 4:6bd81bb1790d 70
nikitateggi 4:6bd81bb1790d 71
nikitateggi 39:69b09bd87502 72 void screen_main_2(int32_t pid) // test main screen
nikitateggi 1:8316c23ec6b9 73 {
nikitateggi 20:7c64e6ecad76 74 char buff2[10];
nikitateggi 20:7c64e6ecad76 75 backlight = 0 ;
nikitateggi 7:11f926351d8f 76 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 77 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 78 sprintf(buff2 ,"%d", pid);
nikitateggi 20:7c64e6ecad76 79 TFT.fillrect(5,20,250,150,White );
nikitateggi 39:69b09bd87502 80 TFT.fillrect(5,20,250,250,White ); // added on 11/8/17 nikita
nikitateggi 39:69b09bd87502 81 TFT.fillrect(60,130,180,200,White );
nikitateggi 39:69b09bd87502 82 TFT.fillrect(60,230,180,300,White ); // changed from 300 to 320 //changed//8/8/17
nikitateggi 39:69b09bd87502 83 // TFT.fillrect(5,20,300,320,White );
nikitateggi 39:69b09bd87502 84 TFT.fillrect(5,230,240,320,White ); // added on 11/8/17 nikita
nikitateggi 7:11f926351d8f 85 TFT.set_font((unsigned char*) Arial24x23);
nikitateggi 20:7c64e6ecad76 86 TFT.foreground(Black);
nikitateggi 20:7c64e6ecad76 87 TFT.locate(10,50) ;
nikitateggi 7:11f926351d8f 88 TFT.printf("PATIENTID") ;
nikitateggi 20:7c64e6ecad76 89 TFT.locate(180,50) ;
nikitateggi 7:11f926351d8f 90 TFT.printf(buff2) ;
nikitateggi 20:7c64e6ecad76 91 TFT.background(Orange) ;
nikitateggi 20:7c64e6ecad76 92 TFT.foreground(Black);
nikitateggi 20:7c64e6ecad76 93 TFT.fillrect( 10,130,100,200,Orange);
nikitateggi 20:7c64e6ecad76 94 TFT.locate(40,160) ;
nikitateggi 20:7c64e6ecad76 95 TFT.printf("BG") ;
nikitateggi 20:7c64e6ecad76 96 TFT.fillrect( 130,130,220,200,Orange);
nikitateggi 20:7c64e6ecad76 97 TFT.locate(145,160) ;
nikitateggi 7:11f926351d8f 98 TFT.printf("ECG") ;
nikitateggi 20:7c64e6ecad76 99 TFT.fillrect( 10,215,100,285,Orange);
nikitateggi 20:7c64e6ecad76 100 TFT.locate(40,245) ;
nikitateggi 20:7c64e6ecad76 101 TFT.printf("BP") ;
nikitateggi 20:7c64e6ecad76 102 TFT.fillrect(130,215,220,285,Orange);
nikitateggi 20:7c64e6ecad76 103 TFT.locate(130,245) ;
nikitateggi 20:7c64e6ecad76 104 TFT.printf("HOME") ;
nikitateggi 7:11f926351d8f 105 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 106 backlight = 1 ;
nikitateggi 7:11f926351d8f 107 }
nikitateggi 1:8316c23ec6b9 108
nikitateggi 1:8316c23ec6b9 109
nikitateggi 0:c47fb0c1bbf6 110
nikitateggi 4:6bd81bb1790d 111 void screen_main_1() // System Configuration main screen
nikitateggi 1:8316c23ec6b9 112 {
nikitateggi 20:7c64e6ecad76 113 backlight = 0 ;
nikitateggi 7:11f926351d8f 114 TFT.BusEnable(true) ;
nikitateggi 7:11f926351d8f 115 TFT.background(GreenYellow) ;
nikitateggi 20:7c64e6ecad76 116 TFT.fillrect(5,127,230,320,White );
nikitateggi 7:11f926351d8f 117 // wait(0.1) ;
nikitateggi 7:11f926351d8f 118 TFT.set_font((unsigned char*) Arial24x23);
nikitateggi 20:7c64e6ecad76 119 TFT.foreground(Black);
nikitateggi 20:7c64e6ecad76 120 TFT.fillrect( 10,130,100,200,GreenYellow);
avp2417 35:43133f017ed4 121 TFT.locate(38,160) ; //changed from 30 to 38 //rashmi 24/7/17 //changed from 40 to 30 //rashmi 22/7/17
avp2417 35:43133f017ed4 122 TFT.printf("BT") ; ////changed from BLE to BT //rashmi 24/7/17
nikitateggi 49:3ff80c4bc1be 123 if (read_debug_status()== 1)
nikitateggi 49:3ff80c4bc1be 124 {
nikitateggi 49:3ff80c4bc1be 125 TFT.fillrect( 130,130,220,200,GreenYellow);
nikitateggi 49:3ff80c4bc1be 126 TFT.locate(150,140) ; //changed from 135 to 145 //rashmi 22/7/17 //
nikitateggi 49:3ff80c4bc1be 127 TFT.printf("DE-") ;
nikitateggi 49:3ff80c4bc1be 128 TFT.locate(145,170) ; //changed from 135 to 145 //rashmi 22/7/17 //
nikitateggi 49:3ff80c4bc1be 129 TFT.printf("BUG"); //changed from ERASE to DEL //rashmi 22/7/17
nikitateggi 49:3ff80c4bc1be 130 }
nikitateggi 20:7c64e6ecad76 131 TFT.fillrect( 10,215,100,285,GreenYellow);
avp2417 35:43133f017ed4 132 TFT.locate(22,245) ; //changed from 26 to 22 //rashmi 24/7/17 //changed from 30 to 26 //rashmi 22/7/17
avp2417 35:43133f017ed4 133 TFT.printf("P-Inf") ;
nikitateggi 20:7c64e6ecad76 134 TFT.fillrect(130,215,220,285,GreenYellow);
nikitateggi 20:7c64e6ecad76 135 TFT.locate(130,245) ;
nikitateggi 20:7c64e6ecad76 136 TFT.printf("HOME") ;
nikitateggi 7:11f926351d8f 137 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 138 backlight = 1 ;
nikitateggi 7:11f926351d8f 139 }
nikitateggi 0:c47fb0c1bbf6 140
nikitateggi 0:c47fb0c1bbf6 141
nikitateggi 4:6bd81bb1790d 142 void screen_ecg() //ECG screen 1
avp2417 35:43133f017ed4 143 {
nikitateggi 20:7c64e6ecad76 144 backlight = 0 ;
nikitateggi 7:11f926351d8f 145 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 146 TFT.fillrect(10,130,100,200,White);
nikitateggi 20:7c64e6ecad76 147 TFT.fillrect(130,130,220,200,White);
nikitateggi 20:7c64e6ecad76 148 TFT.fillrect(130,215,220,285,White);
nikitateggi 20:7c64e6ecad76 149 TFT.fillrect(10,215,100,285,White);
nikitateggi 20:7c64e6ecad76 150 TFT.fillrect(60,130,180,200,White);
nikitateggi 45:067673dae242 151 TFT.fillrect(5,5,115,20,White);
nikitateggi 38:7238f3531ce9 152 TFT.background(Green) ;
nikitateggi 38:7238f3531ce9 153 TFT.foreground(Black) ;
nikitateggi 7:11f926351d8f 154 TFT.fillrect( 60,130,180,200,Green);
nikitateggi 20:7c64e6ecad76 155 TFT.locate(80,150) ;
nikitateggi 7:11f926351d8f 156 TFT.printf("START") ;
nikitateggi 20:7c64e6ecad76 157 TFT.fillrect( 60,230,180,300,Green);
nikitateggi 20:7c64e6ecad76 158 TFT.locate(85,250) ;
nikitateggi 20:7c64e6ecad76 159 TFT.printf("MAIN") ;
nikitateggi 7:11f926351d8f 160 TFT.BusEnable(false) ;
avp2417 35:43133f017ed4 161 backlight = 1 ;
avp2417 35:43133f017ed4 162 }
nikitateggi 1:8316c23ec6b9 163
nikitateggi 1:8316c23ec6b9 164
nikitateggi 0:c47fb0c1bbf6 165
nikitateggi 22:ffa88619551d 166 void screen_ecg_2(uint16_t heart_rate) // ECG screen 2
nikitateggi 1:8316c23ec6b9 167 {
nikitateggi 20:7c64e6ecad76 168 char buf[5];
nikitateggi 20:7c64e6ecad76 169 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 170 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 171 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 172 TFT.foreground(Green) ;
nikitateggi 22:ffa88619551d 173 sprintf (buf, "%d bpm",heart_rate);
nikitateggi 20:7c64e6ecad76 174 TFT.fillrect(5,90,230,150,White);
nikitateggi 20:7c64e6ecad76 175 TFT.locate(3,100) ;
nikitateggi 20:7c64e6ecad76 176 TFT.printf(" ECG Tst Done ") ;
nikitateggi 20:7c64e6ecad76 177 TFT.locate(3,150) ;
nikitateggi 20:7c64e6ecad76 178 TFT.printf(" HeartRate ") ;
nikitateggi 20:7c64e6ecad76 179 TFT.locate(50,180); // changed from 30
nikitateggi 20:7c64e6ecad76 180 TFT.printf(buf) ;
nikitateggi 39:69b09bd87502 181 TFT.set_font((unsigned char*) Arial12x12); // added on 11/8/17 nikita
nikitateggi 39:69b09bd87502 182 TFT.locate(5,291) ;
nikitateggi 39:69b09bd87502 183 TFT.foreground(Navy) ;
nikitateggi 39:69b09bd87502 184 TFT.printf("Study Readings: Not for medical") ; // added on 8/8/17 nikita
nikitateggi 39:69b09bd87502 185 TFT.locate(35,300) ;
nikitateggi 39:69b09bd87502 186 TFT.printf("diagnosis and treatment") ;
nikitateggi 39:69b09bd87502 187 TFT.set_font((unsigned char*) Arial24x23);
nikitateggi 20:7c64e6ecad76 188 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 189 backlight = 1 ;
nikitateggi 20:7c64e6ecad76 190 }
nikitateggi 20:7c64e6ecad76 191
nikitateggi 20:7c64e6ecad76 192 void screen_ecg_lead() // ECG screen for displaying no lead proper lead contact
nikitateggi 20:7c64e6ecad76 193 {
nikitateggi 20:7c64e6ecad76 194 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 195 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 196 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 197 TFT.foreground(Red) ;
nikitateggi 39:69b09bd87502 198 //TFT.fillrect(5,90,230,150,White);
nikitateggi 39:69b09bd87502 199 TFT.fillrect(5,90,230,200,White); // added on 11/08/2017 //nikita
nikitateggi 20:7c64e6ecad76 200 TFT.locate(50,100) ;
nikitateggi 20:7c64e6ecad76 201 TFT.printf("Re-check") ;
nikitateggi 20:7c64e6ecad76 202 TFT.locate(3,130) ;
nikitateggi 20:7c64e6ecad76 203 TFT.printf("Lead Connection") ;
nikitateggi 20:7c64e6ecad76 204 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 205 backlight = 1 ;
nikitateggi 20:7c64e6ecad76 206 }
nikitateggi 20:7c64e6ecad76 207
nikitateggi 20:7c64e6ecad76 208
nikitateggi 20:7c64e6ecad76 209 void screen_ecg_lead_bp_fingerdetect() // ECG screen for displaying no lead proper lead contact
nikitateggi 20:7c64e6ecad76 210 {
nikitateggi 20:7c64e6ecad76 211 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 212 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 213 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 214 TFT.foreground(Red) ;
nikitateggi 39:69b09bd87502 215 // TFT.fillrect(5,90,230,150,White);
nikitateggi 39:69b09bd87502 216 TFT.fillrect(5,90,230,200,White); // added on 11/08/2017 //nikita
nikitateggi 20:7c64e6ecad76 217 TFT.locate(20,100) ;
nikitateggi 20:7c64e6ecad76 218 TFT.printf("Re-check Leads") ;
nikitateggi 20:7c64e6ecad76 219 TFT.locate(50,130) ;
nikitateggi 20:7c64e6ecad76 220 TFT.printf("& finger ") ;
nikitateggi 20:7c64e6ecad76 221 TFT.locate(45,160) ;
nikitateggi 20:7c64e6ecad76 222 TFT.printf("placement") ;
nikitateggi 20:7c64e6ecad76 223 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 224 backlight = 1 ;
nikitateggi 20:7c64e6ecad76 225 }
nikitateggi 20:7c64e6ecad76 226
nikitateggi 20:7c64e6ecad76 227 void screen_ecg_bp() // added screen dispaly text //14/06
nikitateggi 39:69b09bd87502 228 {
nikitateggi 39:69b09bd87502 229 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 230 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 231 TFT.background(Green) ;
nikitateggi 20:7c64e6ecad76 232 TFT.fillrect(10,215,230,290,White);
nikitateggi 20:7c64e6ecad76 233 //TFT.fillrect(60,230,180,300,Green);
nikitateggi 20:7c64e6ecad76 234 //TFT.locate(100,250) ;
nikitateggi 20:7c64e6ecad76 235 TFT.foreground(Black) ;
nikitateggi 20:7c64e6ecad76 236 // TFT.printf("RET") ;
nikitateggi 20:7c64e6ecad76 237 TFT.fillrect( 10,215,100,285,Green);
avp2417 35:43133f017ed4 238 TFT.locate(20,245) ; //changed from 30 to 20 //rashmi 22/7/17
nikitateggi 20:7c64e6ecad76 239 TFT.printf("MAIN") ;
nikitateggi 20:7c64e6ecad76 240 TFT.fillrect(130,215,220,285,Green);
nikitateggi 20:7c64e6ecad76 241 TFT.locate(155,235) ; // changed // points // 13/06
nikitateggi 20:7c64e6ecad76 242 TFT.printf("RE-") ;
avp2417 35:43133f017ed4 243 TFT.locate(140,255) ; //chnaged from 145 to 140 //rashmi 22/7/17
nikitateggi 20:7c64e6ecad76 244 TFT.printf("TEST") ;
nikitateggi 20:7c64e6ecad76 245 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 246 backlight = 1 ;
nikitateggi 3:9a06c2bed650 247
nikitateggi 1:8316c23ec6b9 248 }
nikitateggi 1:8316c23ec6b9 249
nikitateggi 1:8316c23ec6b9 250
nikitateggi 0:c47fb0c1bbf6 251
nikitateggi 4:6bd81bb1790d 252 void screen_bp() // BP main screen
nikitateggi 0:c47fb0c1bbf6 253 {
nikitateggi 7:11f926351d8f 254 backlight = 0 ;
nikitateggi 7:11f926351d8f 255 TFT.BusEnable(true) ;
nikitateggi 7:11f926351d8f 256 TFT.background(Green) ;
nikitateggi 7:11f926351d8f 257 TFT.foreground(Black) ;
nikitateggi 7:11f926351d8f 258 TFT.fillrect(10,130,100,200,White);
nikitateggi 7:11f926351d8f 259 TFT.fillrect(130,130,220,200,White);
nikitateggi 7:11f926351d8f 260 TFT.fillrect(10,215,100,285,White);
nikitateggi 45:067673dae242 261 TFT.fillrect(130,215,220,285,White);
nikitateggi 45:067673dae242 262 TFT.fillrect(5,5,115,20,White);
nikitateggi 7:11f926351d8f 263 TFT.fillrect( 60,130,180,200,Green);
nikitateggi 7:11f926351d8f 264 TFT.locate(80,150) ;
nikitateggi 7:11f926351d8f 265 TFT.printf("START") ;
nikitateggi 7:11f926351d8f 266 TFT.fillrect( 60,230,180,300,Green);
avp2417 35:43133f017ed4 267 TFT.locate(90,250) ; //changed from 100 to 90 //rashmi 22/7/17
nikitateggi 20:7c64e6ecad76 268 TFT.printf("MAIN") ;
nikitateggi 7:11f926351d8f 269 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 270 backlight = 1 ;
nikitateggi 3:9a06c2bed650 271
nikitateggi 3:9a06c2bed650 272 }
nikitateggi 3:9a06c2bed650 273
nikitateggi 4:6bd81bb1790d 274
nikitateggi 39:69b09bd87502 275 void screen_bp1(float SBP, float DBP) // BP screen 2
nikitateggi 3:9a06c2bed650 276 {
nikitateggi 7:11f926351d8f 277 backlight = 0 ;
nikitateggi 7:11f926351d8f 278 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 279 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 280 TFT.foreground(Green) ;
nikitateggi 20:7c64e6ecad76 281 char buf[10];
nikitateggi 20:7c64e6ecad76 282 TFT.fillrect(3,130,200,200,White);
nikitateggi 20:7c64e6ecad76 283 TFT.fillrect(60,230,180,300,White);
nikitateggi 39:69b09bd87502 284 TFT.fillrect(60,110,180,250,White);
nikitateggi 20:7c64e6ecad76 285 TFT.locate(3,100) ;
nikitateggi 20:7c64e6ecad76 286 TFT.printf(" BP Tst Done ") ;
nikitateggi 39:69b09bd87502 287 // sprintf (buf, "SBP: %.0f ",SBP); // changed to display 2 digits after decimal point, 2May'17 Changed to Integer
nikitateggi 39:69b09bd87502 288 sprintf (buf, "SBP: %d ",(uint32_t)SBP); //changed to integer 8/8/2017
nikitateggi 20:7c64e6ecad76 289 TFT.locate(5,140) ; // changed 100 to 150
nikitateggi 7:11f926351d8f 290 TFT.printf(buf) ;
nikitateggi 39:69b09bd87502 291 sprintf (buf, "DBP: %d",(uint32_t)DBP); //changed to integer 8/8/2017
nikitateggi 39:69b09bd87502 292 // sprintf (buf, "DBP: %.0f",DBP); // changed to display 2 digits after decimal point, 2May'17, Changed to integer
nikitateggi 20:7c64e6ecad76 293 TFT.locate(5,170) ; // CHANGED from 150 to 170
nikitateggi 20:7c64e6ecad76 294 TFT.printf(buf) ;
nikitateggi 20:7c64e6ecad76 295 //TFT.fillrect(60,230,180,300,Green);
nikitateggi 20:7c64e6ecad76 296 //TFT.locate(85,250) ;
nikitateggi 20:7c64e6ecad76 297 /* TFT.foreground(Black) ; // commented //16/06
nikitateggi 20:7c64e6ecad76 298 TFT.background(Green) ;
nikitateggi 20:7c64e6ecad76 299 //TFT.printf("RET") ;
nikitateggi 20:7c64e6ecad76 300 TFT.fillrect( 10,215,100,285,Green);
nikitateggi 20:7c64e6ecad76 301 TFT.locate(30,245) ;
nikitateggi 20:7c64e6ecad76 302 TFT.printf("RET") ;
nikitateggi 20:7c64e6ecad76 303 TFT.fillrect(130,215,220,285,Green);
nikitateggi 20:7c64e6ecad76 304 TFT.locate(155,235) ; // changed // points // 13/06
nikitateggi 20:7c64e6ecad76 305 TFT.printf("RE-") ;
nikitateggi 20:7c64e6ecad76 306 TFT.locate(145,255) ;
nikitateggi 20:7c64e6ecad76 307 TFT.printf("TEST") ; */
nikitateggi 39:69b09bd87502 308 TFT.set_font((unsigned char*) Arial12x12);
nikitateggi 39:69b09bd87502 309 TFT.foreground(Navy) ;
nikitateggi 39:69b09bd87502 310 TFT.locate(5,291) ;
nikitateggi 39:69b09bd87502 311 TFT.printf("Study Readings: Not for medical") ; // added on 11/8/17 nikita
nikitateggi 39:69b09bd87502 312 TFT.locate(35,300) ;
nikitateggi 39:69b09bd87502 313 TFT.printf("diagnosis and treatment") ;
nikitateggi 39:69b09bd87502 314 TFT.set_font((unsigned char*) Arial24x23);
nikitateggi 20:7c64e6ecad76 315 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 316 backlight = 1 ;
nikitateggi 3:9a06c2bed650 317 }
nikitateggi 3:9a06c2bed650 318
nikitateggi 3:9a06c2bed650 319
nikitateggi 0:c47fb0c1bbf6 320
nikitateggi 0:c47fb0c1bbf6 321
nikitateggi 1:8316c23ec6b9 322 void screen_glc() // glc main screen
nikitateggi 0:c47fb0c1bbf6 323 {
nikitateggi 3:9a06c2bed650 324
nikitateggi 20:7c64e6ecad76 325 backlight = 0 ;
nikitateggi 7:11f926351d8f 326 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 327 TFT.background(Green) ;
nikitateggi 20:7c64e6ecad76 328 TFT.foreground(Black) ;
nikitateggi 20:7c64e6ecad76 329 TFT.fillrect(10,130,100,200,White);
nikitateggi 20:7c64e6ecad76 330 TFT.fillrect(130,130,220,200,White);
nikitateggi 20:7c64e6ecad76 331 TFT.fillrect(10,215,100,285,White);
nikitateggi 20:7c64e6ecad76 332 TFT.fillrect(130,215,220,285,White);
nikitateggi 45:067673dae242 333 TFT.fillrect(5,5,115,20,White);
nikitateggi 20:7c64e6ecad76 334 // TFT.fillrect( 60,130,180,200,Green);
nikitateggi 20:7c64e6ecad76 335 // TFT.locate(80,150) ;
nikitateggi 20:7c64e6ecad76 336 // TFT.printf("START") ;
nikitateggi 20:7c64e6ecad76 337 TFT.fillrect( 10,130,100,200,Green);
nikitateggi 20:7c64e6ecad76 338 TFT.locate(30,160) ; // changed to 30 from 40
nikitateggi 20:7c64e6ecad76 339 TFT.printf("FBS") ;
nikitateggi 20:7c64e6ecad76 340 TFT.fillrect( 130,130,220,200,Green);
nikitateggi 20:7c64e6ecad76 341 TFT.locate(155,160) ;
nikitateggi 20:7c64e6ecad76 342 TFT.printf("PP") ;
nikitateggi 20:7c64e6ecad76 343 TFT.fillrect( 10,215,100,285,Green);
avp2417 35:43133f017ed4 344 TFT.locate(23,245) ; //changed from 20 to 23 //rashmi 22/7/17
nikitateggi 20:7c64e6ecad76 345 TFT.printf("RAN") ;
nikitateggi 20:7c64e6ecad76 346 TFT.fillrect(130,215,220,285,Green);
avp2417 35:43133f017ed4 347 TFT.locate(145,245); //changed from 150 to 145 //rashmi 22/7/17
nikitateggi 20:7c64e6ecad76 348 TFT.printf("MAIN") ;
nikitateggi 20:7c64e6ecad76 349 // TFT.fillrect( 60,230,180,300,Green);
nikitateggi 20:7c64e6ecad76 350 // TFT.locate(100,250) ;
nikitateggi 20:7c64e6ecad76 351 // TFT.printf("RET") ;
nikitateggi 7:11f926351d8f 352 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 353 backlight = 1 ;
nikitateggi 3:9a06c2bed650 354
nikitateggi 0:c47fb0c1bbf6 355 }
nikitateggi 0:c47fb0c1bbf6 356
nikitateggi 4:6bd81bb1790d 357
nikitateggi 4:6bd81bb1790d 358 void screen_bp2() //BP screen 3
nikitateggi 3:9a06c2bed650 359 {
nikitateggi 3:9a06c2bed650 360
nikitateggi 7:11f926351d8f 361 /* lcd.FillRoundRect(3,130,200,200,COLOR_BLACK);
nikitateggi 3:9a06c2bed650 362 lcd.FillRoundRect(60,230,180,300,COLOR_BLACK);
nikitateggi 7:11f926351d8f 363 lcd.FillRect(5,215,230,290,COLOR_BLACK);*/
nikitateggi 3:9a06c2bed650 364
nikitateggi 3:9a06c2bed650 365 }
nikitateggi 1:8316c23ec6b9 366
nikitateggi 1:8316c23ec6b9 367
nikitateggi 39:69b09bd87502 368 void ecg_countdown() // ECG measurement countdown
nikitateggi 1:8316c23ec6b9 369 {
nikitateggi 20:7c64e6ecad76 370 backlight = 0 ;
nikitateggi 7:11f926351d8f 371 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 372 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 373 TFT.foreground(Green) ;
nikitateggi 20:7c64e6ecad76 374 char tim1[5];
nikitateggi 39:69b09bd87502 375 TFT.fillrect(3,80,240,300,White); //changed on 11/8/17 nikita
nikitateggi 20:7c64e6ecad76 376 TFT.fillrect(60,230,180,300,White);
nikitateggi 20:7c64e6ecad76 377 TFT.fillrect(5,215,230,290,White);
nikitateggi 45:067673dae242 378 TFT.fillrect(5,230,240,320,White );
nikitateggi 20:7c64e6ecad76 379 TFT.locate(25,100) ;
nikitateggi 20:7c64e6ecad76 380 TFT.printf("ECG starts in") ;
nikitateggi 20:7c64e6ecad76 381 for(int i=5;i>=0;i--)
nikitateggi 20:7c64e6ecad76 382 {
nikitateggi 1:8316c23ec6b9 383 wait(1);
nikitateggi 1:8316c23ec6b9 384 sprintf (tim1, "%d",i);
nikitateggi 7:11f926351d8f 385 TFT.locate(120,120) ;
nikitateggi 20:7c64e6ecad76 386 TFT.printf(tim1) ;
nikitateggi 20:7c64e6ecad76 387 }
nikitateggi 39:69b09bd87502 388 TFT.fillrect(5,80,240,200,White);
nikitateggi 39:69b09bd87502 389 TFT.locate(35,110) ;
nikitateggi 39:69b09bd87502 390 TFT.printf("ECG Tst in") ; // added on 11/8/17 nikita
nikitateggi 39:69b09bd87502 391 TFT.locate(50,140) ;
nikitateggi 39:69b09bd87502 392 TFT.printf("progress") ;
nikitateggi 39:69b09bd87502 393 TFT.BusEnable(false) ;
nikitateggi 39:69b09bd87502 394 backlight = 1 ;
nikitateggi 7:11f926351d8f 395
nikitateggi 3:9a06c2bed650 396
nikitateggi 39:69b09bd87502 397 }
nikitateggi 1:8316c23ec6b9 398
suhasini 6:5e33a0f01476 399 void bp_countdown() // ECG measurement countdown
suhasini 6:5e33a0f01476 400 {
nikitateggi 20:7c64e6ecad76 401 backlight = 0 ;
nikitateggi 7:11f926351d8f 402 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 403 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 404 TFT.foreground(Green) ;
nikitateggi 20:7c64e6ecad76 405 char tim1[5];
nikitateggi 20:7c64e6ecad76 406 TFT.fillrect(3,130,200,200,White);
nikitateggi 20:7c64e6ecad76 407 TFT.fillrect(60,230,180,300,White);
nikitateggi 20:7c64e6ecad76 408 TFT.fillrect(1,80,240,290,White); //changed the points// 13/06
nikitateggi 39:69b09bd87502 409 TFT.fillrect(5,230,240,320,White ); //added 11/8/17
nikitateggi 20:7c64e6ecad76 410 TFT.locate(25,100) ;
nikitateggi 20:7c64e6ecad76 411 TFT.printf("BP starts in") ;
nikitateggi 20:7c64e6ecad76 412 for(int i=5;i>=0;i--)
suhasini 6:5e33a0f01476 413 {
suhasini 6:5e33a0f01476 414 wait(1);
suhasini 6:5e33a0f01476 415 sprintf (tim1, "%d",i);
nikitateggi 7:11f926351d8f 416 TFT.locate(120,120) ;
nikitateggi 20:7c64e6ecad76 417 TFT.printf(tim1) ;
suhasini 6:5e33a0f01476 418 }
nikitateggi 39:69b09bd87502 419 TFT.fillrect(5,80,240,200,White);
nikitateggi 39:69b09bd87502 420 TFT.locate(35,110) ;
nikitateggi 39:69b09bd87502 421 TFT.printf("BP Tst in") ; // added on 11/8/17 nikita
nikitateggi 39:69b09bd87502 422 TFT.locate(50,140) ;
nikitateggi 39:69b09bd87502 423 TFT.printf("progress") ;
nikitateggi 39:69b09bd87502 424
nikitateggi 7:11f926351d8f 425 TFT.BusEnable(false) ;
nikitateggi 7:11f926351d8f 426 backlight = 1 ;
nikitateggi 7:11f926351d8f 427 }
nikitateggi 1:8316c23ec6b9 428
nikitateggi 4:6bd81bb1790d 429 void screen_again() // screen to press 'yes' or 'no' to repeat the test
nikitateggi 7:11f926351d8f 430 {
nikitateggi 20:7c64e6ecad76 431 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 432 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 433 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 434 TFT.foreground(Black) ;
nikitateggi 20:7c64e6ecad76 435 TFT.fillrect(5,127,230,200,White);
nikitateggi 20:7c64e6ecad76 436 TFT.locate(50,130) ;
nikitateggi 20:7c64e6ecad76 437 TFT.printf("Take test") ;
nikitateggi 20:7c64e6ecad76 438 TFT.locate(75,160) ;
nikitateggi 20:7c64e6ecad76 439 TFT.printf("again?") ;
nikitateggi 20:7c64e6ecad76 440 TFT.background(Orange) ;
nikitateggi 20:7c64e6ecad76 441 TFT.locate(30,245) ;
nikitateggi 20:7c64e6ecad76 442 TFT.printf("YES") ;
nikitateggi 20:7c64e6ecad76 443 TFT.locate(135,245) ;
nikitateggi 20:7c64e6ecad76 444 TFT.printf(" NO ") ;
nikitateggi 20:7c64e6ecad76 445 backlight = 1 ;
nikitateggi 7:11f926351d8f 446 TFT.BusEnable(false) ;
nikitateggi 3:9a06c2bed650 447
nikitateggi 1:8316c23ec6b9 448 }
nikitateggi 1:8316c23ec6b9 449
nikitateggi 1:8316c23ec6b9 450
nikitateggi 4:6bd81bb1790d 451 void screen_glc_2() // GLC screen 3 after test
nikitateggi 1:8316c23ec6b9 452 {
nikitateggi 3:9a06c2bed650 453
nikitateggi 20:7c64e6ecad76 454 backlight = 0 ;
nikitateggi 7:11f926351d8f 455 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 456 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 457 TFT.foreground(Black) ;
nikitateggi 32:76892fdf5e4c 458 TFT.fillrect(10,215,230,290,White);
nikitateggi 20:7c64e6ecad76 459 //TFT.fillrect(60,230,180,300,Green);
nikitateggi 20:7c64e6ecad76 460 //TFT.locate(85,250) ;
nikitateggi 20:7c64e6ecad76 461 TFT.background(Green);
nikitateggi 20:7c64e6ecad76 462 //TFT.printf("RET") ;
nikitateggi 20:7c64e6ecad76 463 TFT.fillrect( 10,215,100,285,Green);
avp2417 35:43133f017ed4 464 TFT.locate(25,245) ; // changed from 30 to 25 //rashmi 22/7/17
nikitateggi 20:7c64e6ecad76 465 TFT.printf("MAIN") ;
nikitateggi 20:7c64e6ecad76 466 TFT.fillrect(130,215,220,285,Green);
nikitateggi 20:7c64e6ecad76 467 TFT.locate(155,235) ; // changed // points // 13/06
nikitateggi 20:7c64e6ecad76 468 TFT.printf("RE-") ;
nikitateggi 20:7c64e6ecad76 469 TFT.locate(140,255) ; // changed from 145 to 140
nikitateggi 20:7c64e6ecad76 470 TFT.printf("TEST") ;
nikitateggi 20:7c64e6ecad76 471 backlight = 1 ;
nikitateggi 20:7c64e6ecad76 472 TFT.BusEnable(false) ;
nikitateggi 7:11f926351d8f 473
nikitateggi 7:11f926351d8f 474
nikitateggi 7:11f926351d8f 475
nikitateggi 1:8316c23ec6b9 476 }
nikitateggi 1:8316c23ec6b9 477
nikitateggi 4:6bd81bb1790d 478
nikitateggi 4:6bd81bb1790d 479 void glc_1() // GLC screen
nikitateggi 7:11f926351d8f 480 {
nikitateggi 20:7c64e6ecad76 481 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 482 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 483 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 484 TFT.foreground(Magenta ) ;
nikitateggi 20:7c64e6ecad76 485 TFT.fillrect(3,130,200,200,White);
nikitateggi 20:7c64e6ecad76 486 TFT.fillrect(60,230,180,300,White);
nikitateggi 20:7c64e6ecad76 487 TFT.fillrect(5,215,230,290,White);
nikitateggi 20:7c64e6ecad76 488 TFT.fillrect( 130,130,220,200,White);
nikitateggi 39:69b09bd87502 489 TFT.fillrect( 5,95,220,200,White); //added 11/8/17//45 to 5 nikita
nikitateggi 39:69b09bd87502 490 TFT.fillrect(5,230,240,320,White );
nikitateggi 20:7c64e6ecad76 491 TFT.locate(5,130) ;
nikitateggi 20:7c64e6ecad76 492 TFT.printf("Blood Glucose") ;
nikitateggi 20:7c64e6ecad76 493 TFT.locate(5,160) ;
nikitateggi 20:7c64e6ecad76 494 TFT.printf("Insert strip") ;
nikitateggi 20:7c64e6ecad76 495 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 496 backlight = 1 ;
nikitateggi 7:11f926351d8f 497
nikitateggi 7:11f926351d8f 498
nikitateggi 7:11f926351d8f 499
nikitateggi 1:8316c23ec6b9 500 }
nikitateggi 1:8316c23ec6b9 501
nikitateggi 4:6bd81bb1790d 502 void glc_2() // GLC screen
nikitateggi 1:8316c23ec6b9 503 {
nikitateggi 20:7c64e6ecad76 504 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 505 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 506 TFT.locate(5,160) ;
nikitateggi 20:7c64e6ecad76 507 TFT.printf("Strip Detected") ;
nikitateggi 20:7c64e6ecad76 508 TFT.locate(5,190) ;
nikitateggi 20:7c64e6ecad76 509 TFT.printf("Insert Blood") ;
nikitateggi 20:7c64e6ecad76 510 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 511 backlight = 1 ;
nikitateggi 1:8316c23ec6b9 512 }
nikitateggi 0:c47fb0c1bbf6 513
nikitateggi 4:6bd81bb1790d 514
nikitateggi 4:6bd81bb1790d 515 void glc_3() // GLC screen
nikitateggi 1:8316c23ec6b9 516 {
nikitateggi 20:7c64e6ecad76 517 backlight = 0 ;
nikitateggi 45:067673dae242 518 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 519 TFT.locate(5,190) ;
nikitateggi 20:7c64e6ecad76 520 TFT.printf("Blood Detected") ;
nikitateggi 20:7c64e6ecad76 521 TFT.locate( 5,220) ;
nikitateggi 20:7c64e6ecad76 522 TFT.printf("computing") ;
nikitateggi 20:7c64e6ecad76 523 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 524 backlight = 1 ;
nikitateggi 7:11f926351d8f 525 }
nikitateggi 1:8316c23ec6b9 526
nikitateggi 4:6bd81bb1790d 527
nidhinvarghese 15:208b146151ba 528 void glc_4(uint16_t mgdl) // GLC screen to display blood glucose level on the LCD
nikitateggi 7:11f926351d8f 529 {
nikitateggi 20:7c64e6ecad76 530 char buf[10];
nikitateggi 20:7c64e6ecad76 531 sprintf (buf, " BG %d mg/dl",mgdl);
nikitateggi 20:7c64e6ecad76 532 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 533 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 534 TFT.fillrect(5,127,230,320,White);
nikitateggi 20:7c64e6ecad76 535 TFT.locate(3,100) ;
nikitateggi 20:7c64e6ecad76 536 TFT.printf(" BG Tst Done ") ;
nikitateggi 20:7c64e6ecad76 537 TFT.locate(5,130) ;
nikitateggi 7:11f926351d8f 538 TFT.printf(buf) ;
nikitateggi 20:7c64e6ecad76 539 TFT.locate(5,160) ;
nikitateggi 20:7c64e6ecad76 540 TFT.printf("(Range 70-120 mg/dl)") ; // added 16/06
nikitateggi 39:69b09bd87502 541 TFT.set_font((unsigned char*) Arial12x12);
nikitateggi 39:69b09bd87502 542 TFT.foreground(Navy) ;
nikitateggi 39:69b09bd87502 543 TFT.locate(5,291) ;
nikitateggi 39:69b09bd87502 544 TFT.printf("Study Readings: Not for medical") ; // added on 11/8/17 nikita
nikitateggi 39:69b09bd87502 545 TFT.locate(35,300) ;
nikitateggi 39:69b09bd87502 546 TFT.printf("diagnosis and treatment") ;
nikitateggi 39:69b09bd87502 547 TFT.set_font((unsigned char*) Arial24x23);
nikitateggi 20:7c64e6ecad76 548 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 549 backlight = 1 ;
nikitateggi 20:7c64e6ecad76 550 }
nikitateggi 22:ffa88619551d 551
nikitateggi 22:ffa88619551d 552
avp2417 37:92fcbf22bf91 553 void battery_screen_nocharge()
nikitateggi 22:ffa88619551d 554 {
avp2417 37:92fcbf22bf91 555
avp2417 37:92fcbf22bf91 556
nikitateggi 45:067673dae242 557 backlight = 0 ;
avp2417 37:92fcbf22bf91 558 TFT.BusEnable(true) ;
nikitateggi 45:067673dae242 559 TFT.background(Red) ;
avp2417 37:92fcbf22bf91 560 TFT.set_font((unsigned char*) Arial12x12);
nikitateggi 45:067673dae242 561 TFT.foreground(White);
nikitateggi 45:067673dae242 562 TFT.fillrect(5,5,115,20,White);
nikitateggi 45:067673dae242 563 TFT.fillrect(5,5,95,20,Red); //added rect
avp2417 37:92fcbf22bf91 564 TFT.locate(10,8) ;
avp2417 37:92fcbf22bf91 565 TFT.printf("No Charge") ;
avp2417 37:92fcbf22bf91 566 TFT.set_font((unsigned char*) Arial24x23);
avp2417 37:92fcbf22bf91 567 TFT.BusEnable(false) ;
avp2417 37:92fcbf22bf91 568 backlight = 1 ;
avp2417 37:92fcbf22bf91 569
avp2417 37:92fcbf22bf91 570
avp2417 37:92fcbf22bf91 571 }
avp2417 37:92fcbf22bf91 572
avp2417 37:92fcbf22bf91 573 void battery_screen_charge()
avp2417 37:92fcbf22bf91 574 {
nikitateggi 45:067673dae242 575
nikitateggi 22:ffa88619551d 576 backlight = 0 ;
nikitateggi 22:ffa88619551d 577 TFT.BusEnable(true) ;
nikitateggi 45:067673dae242 578 TFT.background(Green) ;
avp2417 37:92fcbf22bf91 579 TFT.set_font((unsigned char*) Arial12x12);
nikitateggi 45:067673dae242 580 TFT.foreground(Black);
nikitateggi 45:067673dae242 581 TFT.fillrect(5,5,115,20,White);
nikitateggi 45:067673dae242 582 TFT.fillrect(5,5,115,20,Green); //added rect
avp2417 37:92fcbf22bf91 583 TFT.locate(10,8) ;
avp2417 37:92fcbf22bf91 584 TFT.printf("Battery Charged") ;
avp2417 37:92fcbf22bf91 585 TFT.set_font((unsigned char*) Arial24x23);
avp2417 37:92fcbf22bf91 586 TFT.BusEnable(false) ;
nikitateggi 45:067673dae242 587 backlight = 1 ;
avp2417 37:92fcbf22bf91 588
avp2417 37:92fcbf22bf91 589 }
avp2417 37:92fcbf22bf91 590
avp2417 37:92fcbf22bf91 591
avp2417 37:92fcbf22bf91 592
avp2417 37:92fcbf22bf91 593 void battery_critically_low_charge()
avp2417 37:92fcbf22bf91 594 {
avp2417 37:92fcbf22bf91 595 backlight = 0 ;
nikitateggi 22:ffa88619551d 596 TFT.BusEnable(true) ;
nikitateggi 45:067673dae242 597 TFT.background(Red) ;
avp2417 37:92fcbf22bf91 598 TFT.set_font((unsigned char*) Arial12x12);
nikitateggi 45:067673dae242 599 TFT.foreground(White);
nikitateggi 45:067673dae242 600 TFT.fillrect(5,5,115,20,White);
nikitateggi 45:067673dae242 601 TFT.fillrect(5,5,95,20,Red); //added rect
avp2417 37:92fcbf22bf91 602 TFT.locate(10,8) ;
avp2417 37:92fcbf22bf91 603 TFT.printf("Critically Low") ;
avp2417 37:92fcbf22bf91 604 TFT.set_font((unsigned char*) Arial24x23);
avp2417 37:92fcbf22bf91 605 TFT.BusEnable(false) ;
avp2417 37:92fcbf22bf91 606 backlight = 1 ;
avp2417 37:92fcbf22bf91 607
avp2417 37:92fcbf22bf91 608 }
avp2417 37:92fcbf22bf91 609
avp2417 37:92fcbf22bf91 610 void battery_low_charge()
avp2417 37:92fcbf22bf91 611 {
nikitateggi 45:067673dae242 612 backlight = 0 ;
avp2417 37:92fcbf22bf91 613 TFT.BusEnable(true) ;
nikitateggi 45:067673dae242 614 TFT.background(Green) ;
avp2417 37:92fcbf22bf91 615 TFT.set_font((unsigned char*) Arial12x12);
nikitateggi 45:067673dae242 616 TFT.foreground(Black);
nikitateggi 45:067673dae242 617 TFT.fillrect(5,5,115,20,White);
nikitateggi 45:067673dae242 618 TFT.fillrect(5,5,95,20,Green); //added rect
avp2417 37:92fcbf22bf91 619 TFT.locate(10,8) ;
avp2417 37:92fcbf22bf91 620 TFT.printf("Low Battery") ;
avp2417 37:92fcbf22bf91 621 TFT.set_font((unsigned char*) Arial24x23);
avp2417 37:92fcbf22bf91 622 TFT.BusEnable(false) ;
avp2417 37:92fcbf22bf91 623 backlight = 1 ;
avp2417 37:92fcbf22bf91 624
avp2417 37:92fcbf22bf91 625 }
avp2417 35:43133f017ed4 626
avp2417 35:43133f017ed4 627 void screen_ecg_error()
nikitateggi 31:0f67acfc6236 628 {
nikitateggi 31:0f67acfc6236 629 backlight = 0 ;
nikitateggi 31:0f67acfc6236 630 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 631 TFT.background(White) ;
nikitateggi 31:0f67acfc6236 632 TFT.foreground(Red) ;
nikitateggi 45:067673dae242 633 TFT.fillrect(5,90,230,200,White); // added on 11/8/17 nikita
nikitateggi 45:067673dae242 634
nikitateggi 31:0f67acfc6236 635 TFT.locate(50,100) ;
nikitateggi 31:0f67acfc6236 636 TFT.printf("ERROR!") ;
nikitateggi 31:0f67acfc6236 637 TFT.locate(20,130) ;
nikitateggi 31:0f67acfc6236 638 TFT.printf("Take ReTest") ;
nikitateggi 31:0f67acfc6236 639 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 640 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 641 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 642 backlight = 1 ;
nikitateggi 31:0f67acfc6236 643 }
nikitateggi 31:0f67acfc6236 644
nikitateggi 31:0f67acfc6236 645 void screen_bp_error()
nikitateggi 31:0f67acfc6236 646 {
nikitateggi 31:0f67acfc6236 647 backlight = 0 ;
nikitateggi 31:0f67acfc6236 648 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 649 TFT.background(White) ;
nikitateggi 31:0f67acfc6236 650 TFT.foreground(Red) ;
nikitateggi 45:067673dae242 651 TFT.fillrect(5,90,230,150,White);
nikitateggi 45:067673dae242 652
nikitateggi 31:0f67acfc6236 653 TFT.locate(50,100) ;
nikitateggi 31:0f67acfc6236 654 TFT.printf("ERROR!") ;
nikitateggi 31:0f67acfc6236 655 TFT.locate(20,130) ;
nikitateggi 31:0f67acfc6236 656 TFT.printf("Take ReTest") ;
nikitateggi 31:0f67acfc6236 657 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 658 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 659 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 660 backlight = 1 ;
nikitateggi 31:0f67acfc6236 661 }
nikitateggi 31:0f67acfc6236 662
nikitateggi 31:0f67acfc6236 663
avp2417 35:43133f017ed4 664 void glc_error() //glc replace test strip
nikitateggi 31:0f67acfc6236 665 {
nikitateggi 31:0f67acfc6236 666 backlight = 0 ;
nikitateggi 31:0f67acfc6236 667 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 668 TFT.background(White) ;
nikitateggi 31:0f67acfc6236 669 TFT.foreground(Red) ;
nikitateggi 45:067673dae242 670 TFT.fillrect(5,90,230,300,White);
nikitateggi 45:067673dae242 671
avp2417 35:43133f017ed4 672 TFT.locate(60,100) ; //changed from 50 to 60 //rashmi 22/7/17
avp2417 35:43133f017ed4 673 TFT.printf("Replace") ;
avp2417 35:43133f017ed4 674 TFT.locate(40,130) ; //changed from 20 to 40 //rashmi 22/7/17
avp2417 35:43133f017ed4 675 TFT.printf("Test Strip") ;
nikitateggi 31:0f67acfc6236 676 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 677 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 678 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 679 backlight = 1 ;
nikitateggi 31:0f67acfc6236 680 }
nikitateggi 31:0f67acfc6236 681
nikitateggi 31:0f67acfc6236 682
avp2417 35:43133f017ed4 683 void BT_connection()
nikitateggi 31:0f67acfc6236 684 {
nikitateggi 31:0f67acfc6236 685 backlight = 0 ;
nikitateggi 31:0f67acfc6236 686 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 687 TFT.background(White) ;
nikitateggi 31:0f67acfc6236 688 TFT.foreground(Blue) ;
nikitateggi 45:067673dae242 689 TFT.fillrect(5,90,230,300,White);
nikitateggi 45:067673dae242 690 TFT.fillrect(5,5,115,20,White);
nikitateggi 31:0f67acfc6236 691 TFT.locate(40,140) ;
nikitateggi 31:0f67acfc6236 692 TFT.printf("Connected") ;
nikitateggi 31:0f67acfc6236 693 TFT.locate(20,170) ;
nikitateggi 31:0f67acfc6236 694 TFT.printf("Sending Files") ;
nikitateggi 31:0f67acfc6236 695 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 696 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 697 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 698 backlight = 1 ;
nikitateggi 31:0f67acfc6236 699 }
nikitateggi 31:0f67acfc6236 700
nikitateggi 31:0f67acfc6236 701 void BT_no_connection()
nikitateggi 31:0f67acfc6236 702 {
nikitateggi 31:0f67acfc6236 703 backlight = 0 ;
nikitateggi 31:0f67acfc6236 704 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 705 TFT.background(White) ;
nikitateggi 31:0f67acfc6236 706 TFT.foreground(Blue) ;
nikitateggi 45:067673dae242 707 TFT.fillrect(5,90,230,300,White);
nikitateggi 45:067673dae242 708 TFT.fillrect(5,5,115,20,White);
nikitateggi 31:0f67acfc6236 709 TFT.locate(80,140) ;
nikitateggi 31:0f67acfc6236 710 TFT.printf("Not") ;
nikitateggi 31:0f67acfc6236 711 TFT.locate(40,160) ;
nikitateggi 31:0f67acfc6236 712 TFT.printf("Connected") ;
nikitateggi 31:0f67acfc6236 713 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 714 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 715 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 716 backlight = 1 ;
nikitateggi 31:0f67acfc6236 717 }
nikitateggi 31:0f67acfc6236 718
nikitateggi 31:0f67acfc6236 719 void BT_finished()
nikitateggi 31:0f67acfc6236 720 {
nikitateggi 31:0f67acfc6236 721 backlight = 0 ;
nikitateggi 31:0f67acfc6236 722 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 723 TFT.background(White) ;
nikitateggi 31:0f67acfc6236 724 TFT.foreground(Blue) ;
nikitateggi 31:0f67acfc6236 725 TFT.fillrect(5,90,230,300,White);
nikitateggi 45:067673dae242 726
nikitateggi 31:0f67acfc6236 727 TFT.locate(20,140) ;
nikitateggi 31:0f67acfc6236 728 TFT.printf("Files Tranfer") ;
nikitateggi 31:0f67acfc6236 729 TFT.locate(40,170) ;
nikitateggi 31:0f67acfc6236 730 TFT.printf("Completed") ;
nikitateggi 31:0f67acfc6236 731 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 732 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 733 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 734 backlight = 1 ;
nikitateggi 31:0f67acfc6236 735 }
nikitateggi 31:0f67acfc6236 736
nikitateggi 31:0f67acfc6236 737
nikitateggi 31:0f67acfc6236 738 void screen_BT_return() // BT main screen
nikitateggi 31:0f67acfc6236 739 {
nikitateggi 31:0f67acfc6236 740 backlight = 0 ;
nikitateggi 31:0f67acfc6236 741 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 742 TFT.background(Green) ;
nikitateggi 31:0f67acfc6236 743 TFT.foreground(Black) ;
nikitateggi 39:69b09bd87502 744 // TFT.fillrect(5,90,230,300,White);
nikitateggi 45:067673dae242 745
nikitateggi 31:0f67acfc6236 746 TFT.fillrect( 60,230,180,300,Green);
nikitateggi 31:0f67acfc6236 747 TFT.locate(80,250) ;
nikitateggi 31:0f67acfc6236 748 TFT.printf("MAIN") ;
nikitateggi 31:0f67acfc6236 749 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 750 backlight = 1 ;
nikitateggi 31:0f67acfc6236 751
nikitateggi 31:0f67acfc6236 752 }
nikitateggi 31:0f67acfc6236 753
nikitateggi 31:0f67acfc6236 754
nikitateggi 31:0f67acfc6236 755 void screen_patient_info(uint32_t current_test_pid,uint32_t bt_file_sent_pid)
nikitateggi 31:0f67acfc6236 756 {
avp2417 35:43133f017ed4 757
nikitateggi 31:0f67acfc6236 758 char buf[10];
avp2417 35:43133f017ed4 759 sprintf (buf, "Test pid:%d",current_test_pid); //changed from 'current pid' to 'Test pid' //rashmi 24/7/17
nikitateggi 31:0f67acfc6236 760 backlight = 0 ;
nikitateggi 31:0f67acfc6236 761 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 762 TFT.background(White);
nikitateggi 31:0f67acfc6236 763 TFT.foreground(Blue);
nikitateggi 31:0f67acfc6236 764 TFT.fillrect(5,90,230,300,White);
nikitateggi 45:067673dae242 765 TFT.fillrect(5,5,115,20,White);
avp2417 35:43133f017ed4 766 TFT.locate(15,140) ; //changed from 20 to 15 //rashmi 24/7/17
avp2417 35:43133f017ed4 767 TFT.printf(buf) ;
avp2417 35:43133f017ed4 768 sprintf (buf,"BT pid :%d",bt_file_sent_pid);
avp2417 35:43133f017ed4 769 TFT.locate(15,170) ; //changed from 20 to 15 //rashmi 24/7/17
nikitateggi 31:0f67acfc6236 770 TFT.printf(buf) ;
nikitateggi 31:0f67acfc6236 771 TFT.background(Green) ;
nikitateggi 31:0f67acfc6236 772 TFT.foreground(Black) ;
nikitateggi 31:0f67acfc6236 773 TFT.fillrect( 60,230,180,300,Green);
nikitateggi 31:0f67acfc6236 774 TFT.locate(80,250) ;
nikitateggi 31:0f67acfc6236 775 TFT.printf("MAIN") ;
nikitateggi 31:0f67acfc6236 776 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 777 backlight = 1 ;
nikitateggi 31:0f67acfc6236 778
nikitateggi 39:69b09bd87502 779 }
nikitateggi 39:69b09bd87502 780 void glc_error_test_strip_removed() //glc replace test strip// // added on 8/8/17 nikita
nikitateggi 39:69b09bd87502 781 {
nikitateggi 39:69b09bd87502 782 backlight = 0 ;
nikitateggi 39:69b09bd87502 783 TFT.BusEnable(true) ;
nikitateggi 39:69b09bd87502 784 TFT.background(White) ;
nikitateggi 39:69b09bd87502 785 TFT.foreground(Red) ;
nikitateggi 39:69b09bd87502 786 TFT.fillrect(5,90,230,300,White);
nikitateggi 45:067673dae242 787
nikitateggi 39:69b09bd87502 788 TFT.locate(50,130); //changed from 50 to 60 //rashmi 22/7/17// changed from 100 to 130added on 10/8/17 nikita
nikitateggi 39:69b09bd87502 789 TFT.printf("Test Strip") ;
nikitateggi 39:69b09bd87502 790 TFT.locate(50,160) ; //changed from 20 to 40 //rashmi 22/7/17// changed from 130 to 160added on 10/8/17 nikita
nikitateggi 39:69b09bd87502 791 TFT.printf("Removed") ;
nikitateggi 39:69b09bd87502 792 //TFT.locate(45,160) ;
nikitateggi 39:69b09bd87502 793 // TFT.printf("") ;
nikitateggi 39:69b09bd87502 794 TFT.BusEnable(false) ;
nikitateggi 39:69b09bd87502 795 backlight = 1 ;
nikitateggi 49:3ff80c4bc1be 796 }
nikitateggi 49:3ff80c4bc1be 797
nikitateggi 49:3ff80c4bc1be 798 void screen_debug()
nikitateggi 49:3ff80c4bc1be 799 {
nikitateggi 49:3ff80c4bc1be 800 backlight = 0 ;
nikitateggi 49:3ff80c4bc1be 801 TFT.BusEnable(true) ;
nikitateggi 49:3ff80c4bc1be 802 TFT.background(GreenYellow) ;
nikitateggi 49:3ff80c4bc1be 803 TFT.fillrect(5,127,230,320,White );
nikitateggi 49:3ff80c4bc1be 804 TFT.set_font((unsigned char*) Arial24x23);
nikitateggi 49:3ff80c4bc1be 805 TFT.foreground(Black);
nikitateggi 49:3ff80c4bc1be 806 TFT.fillrect( 10,130,100,200,GreenYellow);
nikitateggi 49:3ff80c4bc1be 807 TFT.locate(45,140) ; //changed from 30 to 38 //rashmi 24/7/17 //changed from 40 to 30 //rashmi 22/7/17
nikitateggi 49:3ff80c4bc1be 808 TFT.printf("SD") ; ////changed from BLE to BT //rashmi 24/7/17
nikitateggi 49:3ff80c4bc1be 809 TFT.locate(30,170) ; //changed from 30 to 38 //rashmi 24/7/17 //changed from 40 to 30 //rashmi 22/7/17
nikitateggi 49:3ff80c4bc1be 810 TFT.printf("DEL") ;
nikitateggi 49:3ff80c4bc1be 811 TFT.fillrect( 130,130,220,200,GreenYellow);
nikitateggi 49:3ff80c4bc1be 812 TFT.locate(150,140) ; //changed from 135 to 145 //rashmi 22/7/17
nikitateggi 49:3ff80c4bc1be 813 TFT.printf("SD") ;
nikitateggi 49:3ff80c4bc1be 814 TFT.locate(140,170) ; //changed from 135 to 145 //rashmi 22/7/17
nikitateggi 49:3ff80c4bc1be 815 TFT.printf("READ") ; //changed from ERASE to DEL //rashmi 22/7/17
nikitateggi 49:3ff80c4bc1be 816 TFT.fillrect( 10,215,100,285,GreenYellow);
nikitateggi 49:3ff80c4bc1be 817 TFT.locate(22,245) ; //changed from 26 to 22 //rashmi 24/7/17 //changed from 30 to 26 //rashmi 22/7/17
nikitateggi 49:3ff80c4bc1be 818 TFT.printf("*") ;
nikitateggi 49:3ff80c4bc1be 819 TFT.fillrect(130,215,220,285,GreenYellow);
nikitateggi 49:3ff80c4bc1be 820 TFT.locate(130,245) ;
nikitateggi 49:3ff80c4bc1be 821 TFT.printf("BACK") ;
nikitateggi 49:3ff80c4bc1be 822 TFT.BusEnable(false) ;
nikitateggi 49:3ff80c4bc1be 823 backlight = 1 ;
nikitateggi 49:3ff80c4bc1be 824
nikitateggi 49:3ff80c4bc1be 825
nikitateggi 49:3ff80c4bc1be 826 }
nikitateggi 49:3ff80c4bc1be 827
nikitateggi 49:3ff80c4bc1be 828 void screen_sdcard_delete(void)
nikitateggi 49:3ff80c4bc1be 829 {
nikitateggi 49:3ff80c4bc1be 830 backlight = 0 ;
nikitateggi 49:3ff80c4bc1be 831 TFT.BusEnable(true) ;
nikitateggi 49:3ff80c4bc1be 832 TFT.fillrect(10,130,100,200,White);
nikitateggi 49:3ff80c4bc1be 833 TFT.fillrect(130,130,220,200,White);
nikitateggi 49:3ff80c4bc1be 834 TFT.fillrect(10,215,100,285,White);
nikitateggi 49:3ff80c4bc1be 835 TFT.fillrect(130,215,220,285,White);
nikitateggi 49:3ff80c4bc1be 836 TFT.fillrect(5,5,115,20,White);
nikitateggi 49:3ff80c4bc1be 837 TFT.background(White) ;
nikitateggi 49:3ff80c4bc1be 838 TFT.foreground(Red);
nikitateggi 49:3ff80c4bc1be 839 TFT.locate(15,140) ;
nikitateggi 49:3ff80c4bc1be 840 TFT.printf("SD card erased");
nikitateggi 49:3ff80c4bc1be 841
nikitateggi 49:3ff80c4bc1be 842 TFT.fillrect( 60,230,180,300,Green);
nikitateggi 49:3ff80c4bc1be 843 TFT.background(Green) ;
nikitateggi 49:3ff80c4bc1be 844 TFT.foreground(Black) ;
nikitateggi 49:3ff80c4bc1be 845 TFT.locate(80,250) ;
nikitateggi 49:3ff80c4bc1be 846 TFT.printf("MAIN") ;
nikitateggi 49:3ff80c4bc1be 847 TFT.BusEnable(false) ;
nikitateggi 49:3ff80c4bc1be 848 backlight = 1 ;
nikitateggi 49:3ff80c4bc1be 849 }
nikitateggi 49:3ff80c4bc1be 850
nikitateggi 49:3ff80c4bc1be 851 void screen_sdcard_read(void)
nikitateggi 49:3ff80c4bc1be 852 {
nikitateggi 49:3ff80c4bc1be 853 backlight = 0 ;
nikitateggi 49:3ff80c4bc1be 854 TFT.BusEnable(true) ;
nikitateggi 49:3ff80c4bc1be 855 TFT.fillrect(10,130,100,200,White);
nikitateggi 49:3ff80c4bc1be 856 TFT.fillrect(130,130,220,200,White);
nikitateggi 49:3ff80c4bc1be 857 TFT.fillrect(10,215,100,285,White);
nikitateggi 49:3ff80c4bc1be 858 TFT.fillrect(130,215,220,285,White);
nikitateggi 49:3ff80c4bc1be 859 TFT.fillrect(5,5,115,20,White);
nikitateggi 49:3ff80c4bc1be 860 TFT.background(White) ;
nikitateggi 49:3ff80c4bc1be 861 TFT.foreground(Red);
nikitateggi 49:3ff80c4bc1be 862 TFT.locate(15,140) ;
nikitateggi 49:3ff80c4bc1be 863 TFT.printf("SD read finished");
nikitateggi 49:3ff80c4bc1be 864 TFT.fillrect( 60,230,180,300,Green);
nikitateggi 49:3ff80c4bc1be 865 TFT.background(Green) ;
nikitateggi 49:3ff80c4bc1be 866 TFT.foreground(Black) ;
nikitateggi 49:3ff80c4bc1be 867 TFT.locate(80,250) ;
nikitateggi 49:3ff80c4bc1be 868 TFT.printf("MAIN") ;
nikitateggi 49:3ff80c4bc1be 869 TFT.BusEnable(false) ;
nikitateggi 49:3ff80c4bc1be 870 backlight = 1 ;
nikitateggi 49:3ff80c4bc1be 871 }