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 Aug 11 12:19:25 2017 +0000
Revision:
39:69b09bd87502
Parent:
38:7238f3531ce9
Child:
45:067673dae242
Code used for deployment of POC3 on 11th august 2017.

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 3:9a06c2bed650 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 20:7c64e6ecad76 52 TFT.locate(35,20) ;
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 20:7c64e6ecad76 123 TFT.fillrect( 130,130,220,200,GreenYellow);
avp2417 35:43133f017ed4 124 TFT.locate(145,160) ; //changed from 135 to 145 //rashmi 22/7/17
avp2417 35:43133f017ed4 125 TFT.printf("DEL") ; //changed from ERASE to DEL //rashmi 22/7/17
nikitateggi 20:7c64e6ecad76 126 TFT.fillrect( 10,215,100,285,GreenYellow);
avp2417 35:43133f017ed4 127 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 128 TFT.printf("P-Inf") ;
nikitateggi 20:7c64e6ecad76 129 TFT.fillrect(130,215,220,285,GreenYellow);
nikitateggi 20:7c64e6ecad76 130 TFT.locate(130,245) ;
nikitateggi 20:7c64e6ecad76 131 TFT.printf("HOME") ;
nikitateggi 7:11f926351d8f 132 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 133 backlight = 1 ;
nikitateggi 7:11f926351d8f 134 }
nikitateggi 0:c47fb0c1bbf6 135
nikitateggi 0:c47fb0c1bbf6 136
nikitateggi 4:6bd81bb1790d 137 void screen_ecg() //ECG screen 1
avp2417 35:43133f017ed4 138 {
nikitateggi 20:7c64e6ecad76 139 backlight = 0 ;
nikitateggi 7:11f926351d8f 140 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 141 TFT.fillrect(10,130,100,200,White);
nikitateggi 20:7c64e6ecad76 142 TFT.fillrect(130,130,220,200,White);
nikitateggi 20:7c64e6ecad76 143 TFT.fillrect(130,215,220,285,White);
nikitateggi 20:7c64e6ecad76 144 TFT.fillrect(10,215,100,285,White);
nikitateggi 20:7c64e6ecad76 145 TFT.fillrect(60,130,180,200,White);
nikitateggi 38:7238f3531ce9 146 TFT.background(Green) ;
nikitateggi 38:7238f3531ce9 147 TFT.foreground(Black) ;
nikitateggi 7:11f926351d8f 148 TFT.fillrect( 60,130,180,200,Green);
nikitateggi 20:7c64e6ecad76 149 TFT.locate(80,150) ;
nikitateggi 7:11f926351d8f 150 TFT.printf("START") ;
nikitateggi 20:7c64e6ecad76 151 TFT.fillrect( 60,230,180,300,Green);
nikitateggi 20:7c64e6ecad76 152 TFT.locate(85,250) ;
nikitateggi 20:7c64e6ecad76 153 TFT.printf("MAIN") ;
nikitateggi 7:11f926351d8f 154 TFT.BusEnable(false) ;
avp2417 35:43133f017ed4 155 backlight = 1 ;
avp2417 35:43133f017ed4 156 }
nikitateggi 1:8316c23ec6b9 157
nikitateggi 1:8316c23ec6b9 158
nikitateggi 0:c47fb0c1bbf6 159
nikitateggi 22:ffa88619551d 160 void screen_ecg_2(uint16_t heart_rate) // ECG screen 2
nikitateggi 1:8316c23ec6b9 161 {
nikitateggi 20:7c64e6ecad76 162 char buf[5];
nikitateggi 20:7c64e6ecad76 163 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 164 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 165 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 166 TFT.foreground(Green) ;
nikitateggi 22:ffa88619551d 167 sprintf (buf, "%d bpm",heart_rate);
nikitateggi 20:7c64e6ecad76 168 TFT.fillrect(5,90,230,150,White);
nikitateggi 20:7c64e6ecad76 169 TFT.locate(3,100) ;
nikitateggi 20:7c64e6ecad76 170 TFT.printf(" ECG Tst Done ") ;
nikitateggi 20:7c64e6ecad76 171 TFT.locate(3,150) ;
nikitateggi 20:7c64e6ecad76 172 TFT.printf(" HeartRate ") ;
nikitateggi 20:7c64e6ecad76 173 TFT.locate(50,180); // changed from 30
nikitateggi 20:7c64e6ecad76 174 TFT.printf(buf) ;
nikitateggi 39:69b09bd87502 175 TFT.set_font((unsigned char*) Arial12x12); // added on 11/8/17 nikita
nikitateggi 39:69b09bd87502 176 TFT.locate(5,291) ;
nikitateggi 39:69b09bd87502 177 TFT.foreground(Navy) ;
nikitateggi 39:69b09bd87502 178 TFT.printf("Study Readings: Not for medical") ; // added on 8/8/17 nikita
nikitateggi 39:69b09bd87502 179 TFT.locate(35,300) ;
nikitateggi 39:69b09bd87502 180 TFT.printf("diagnosis and treatment") ;
nikitateggi 39:69b09bd87502 181 TFT.set_font((unsigned char*) Arial24x23);
nikitateggi 20:7c64e6ecad76 182 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 183 backlight = 1 ;
nikitateggi 20:7c64e6ecad76 184 }
nikitateggi 20:7c64e6ecad76 185
nikitateggi 20:7c64e6ecad76 186 void screen_ecg_lead() // ECG screen for displaying no lead proper lead contact
nikitateggi 20:7c64e6ecad76 187 {
nikitateggi 20:7c64e6ecad76 188 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 189 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 190 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 191 TFT.foreground(Red) ;
nikitateggi 39:69b09bd87502 192 //TFT.fillrect(5,90,230,150,White);
nikitateggi 39:69b09bd87502 193 TFT.fillrect(5,90,230,200,White); // added on 11/08/2017 //nikita
nikitateggi 20:7c64e6ecad76 194 TFT.locate(50,100) ;
nikitateggi 20:7c64e6ecad76 195 TFT.printf("Re-check") ;
nikitateggi 20:7c64e6ecad76 196 TFT.locate(3,130) ;
nikitateggi 20:7c64e6ecad76 197 TFT.printf("Lead Connection") ;
nikitateggi 20:7c64e6ecad76 198 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 199 backlight = 1 ;
nikitateggi 20:7c64e6ecad76 200 }
nikitateggi 20:7c64e6ecad76 201
nikitateggi 20:7c64e6ecad76 202
nikitateggi 20:7c64e6ecad76 203 void screen_ecg_lead_bp_fingerdetect() // ECG screen for displaying no lead proper lead contact
nikitateggi 20:7c64e6ecad76 204 {
nikitateggi 20:7c64e6ecad76 205 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 206 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 207 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 208 TFT.foreground(Red) ;
nikitateggi 39:69b09bd87502 209 // TFT.fillrect(5,90,230,150,White);
nikitateggi 39:69b09bd87502 210 TFT.fillrect(5,90,230,200,White); // added on 11/08/2017 //nikita
nikitateggi 20:7c64e6ecad76 211 TFT.locate(20,100) ;
nikitateggi 20:7c64e6ecad76 212 TFT.printf("Re-check Leads") ;
nikitateggi 20:7c64e6ecad76 213 TFT.locate(50,130) ;
nikitateggi 20:7c64e6ecad76 214 TFT.printf("& finger ") ;
nikitateggi 20:7c64e6ecad76 215 TFT.locate(45,160) ;
nikitateggi 20:7c64e6ecad76 216 TFT.printf("placement") ;
nikitateggi 20:7c64e6ecad76 217 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 218 backlight = 1 ;
nikitateggi 20:7c64e6ecad76 219 }
nikitateggi 20:7c64e6ecad76 220
nikitateggi 20:7c64e6ecad76 221 void screen_ecg_bp() // added screen dispaly text //14/06
nikitateggi 39:69b09bd87502 222 {
nikitateggi 39:69b09bd87502 223 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 224 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 225 TFT.background(Green) ;
nikitateggi 20:7c64e6ecad76 226 TFT.fillrect(10,215,230,290,White);
nikitateggi 20:7c64e6ecad76 227 //TFT.fillrect(60,230,180,300,Green);
nikitateggi 20:7c64e6ecad76 228 //TFT.locate(100,250) ;
nikitateggi 20:7c64e6ecad76 229 TFT.foreground(Black) ;
nikitateggi 20:7c64e6ecad76 230 // TFT.printf("RET") ;
nikitateggi 20:7c64e6ecad76 231 TFT.fillrect( 10,215,100,285,Green);
avp2417 35:43133f017ed4 232 TFT.locate(20,245) ; //changed from 30 to 20 //rashmi 22/7/17
nikitateggi 20:7c64e6ecad76 233 TFT.printf("MAIN") ;
nikitateggi 20:7c64e6ecad76 234 TFT.fillrect(130,215,220,285,Green);
nikitateggi 20:7c64e6ecad76 235 TFT.locate(155,235) ; // changed // points // 13/06
nikitateggi 20:7c64e6ecad76 236 TFT.printf("RE-") ;
avp2417 35:43133f017ed4 237 TFT.locate(140,255) ; //chnaged from 145 to 140 //rashmi 22/7/17
nikitateggi 20:7c64e6ecad76 238 TFT.printf("TEST") ;
nikitateggi 20:7c64e6ecad76 239 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 240 backlight = 1 ;
nikitateggi 3:9a06c2bed650 241
nikitateggi 1:8316c23ec6b9 242 }
nikitateggi 1:8316c23ec6b9 243
nikitateggi 1:8316c23ec6b9 244
nikitateggi 0:c47fb0c1bbf6 245
nikitateggi 4:6bd81bb1790d 246 void screen_bp() // BP main screen
nikitateggi 0:c47fb0c1bbf6 247 {
nikitateggi 7:11f926351d8f 248 backlight = 0 ;
nikitateggi 7:11f926351d8f 249 TFT.BusEnable(true) ;
nikitateggi 7:11f926351d8f 250 TFT.background(Green) ;
nikitateggi 7:11f926351d8f 251 TFT.foreground(Black) ;
nikitateggi 7:11f926351d8f 252 TFT.fillrect(10,130,100,200,White);
nikitateggi 7:11f926351d8f 253 TFT.fillrect(130,130,220,200,White);
nikitateggi 7:11f926351d8f 254 TFT.fillrect(10,215,100,285,White);
nikitateggi 7:11f926351d8f 255 TFT.fillrect(130,215,220,285,White);
nikitateggi 7:11f926351d8f 256 TFT.fillrect( 60,130,180,200,Green);
nikitateggi 7:11f926351d8f 257 TFT.locate(80,150) ;
nikitateggi 7:11f926351d8f 258 TFT.printf("START") ;
nikitateggi 7:11f926351d8f 259 TFT.fillrect( 60,230,180,300,Green);
avp2417 35:43133f017ed4 260 TFT.locate(90,250) ; //changed from 100 to 90 //rashmi 22/7/17
nikitateggi 20:7c64e6ecad76 261 TFT.printf("MAIN") ;
nikitateggi 7:11f926351d8f 262 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 263 backlight = 1 ;
nikitateggi 3:9a06c2bed650 264
nikitateggi 3:9a06c2bed650 265 }
nikitateggi 3:9a06c2bed650 266
nikitateggi 4:6bd81bb1790d 267
nikitateggi 39:69b09bd87502 268 void screen_bp1(float SBP, float DBP) // BP screen 2
nikitateggi 3:9a06c2bed650 269 {
nikitateggi 7:11f926351d8f 270 backlight = 0 ;
nikitateggi 7:11f926351d8f 271 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 272 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 273 TFT.foreground(Green) ;
nikitateggi 20:7c64e6ecad76 274 char buf[10];
nikitateggi 20:7c64e6ecad76 275 TFT.fillrect(3,130,200,200,White);
nikitateggi 20:7c64e6ecad76 276 TFT.fillrect(60,230,180,300,White);
nikitateggi 39:69b09bd87502 277 TFT.fillrect(60,110,180,250,White);
nikitateggi 20:7c64e6ecad76 278 TFT.locate(3,100) ;
nikitateggi 20:7c64e6ecad76 279 TFT.printf(" BP Tst Done ") ;
nikitateggi 39:69b09bd87502 280 // sprintf (buf, "SBP: %.0f ",SBP); // changed to display 2 digits after decimal point, 2May'17 Changed to Integer
nikitateggi 39:69b09bd87502 281 sprintf (buf, "SBP: %d ",(uint32_t)SBP); //changed to integer 8/8/2017
nikitateggi 20:7c64e6ecad76 282 TFT.locate(5,140) ; // changed 100 to 150
nikitateggi 7:11f926351d8f 283 TFT.printf(buf) ;
nikitateggi 39:69b09bd87502 284 sprintf (buf, "DBP: %d",(uint32_t)DBP); //changed to integer 8/8/2017
nikitateggi 39:69b09bd87502 285 // sprintf (buf, "DBP: %.0f",DBP); // changed to display 2 digits after decimal point, 2May'17, Changed to integer
nikitateggi 20:7c64e6ecad76 286 TFT.locate(5,170) ; // CHANGED from 150 to 170
nikitateggi 20:7c64e6ecad76 287 TFT.printf(buf) ;
nikitateggi 20:7c64e6ecad76 288 //TFT.fillrect(60,230,180,300,Green);
nikitateggi 20:7c64e6ecad76 289 //TFT.locate(85,250) ;
nikitateggi 20:7c64e6ecad76 290 /* TFT.foreground(Black) ; // commented //16/06
nikitateggi 20:7c64e6ecad76 291 TFT.background(Green) ;
nikitateggi 20:7c64e6ecad76 292 //TFT.printf("RET") ;
nikitateggi 20:7c64e6ecad76 293 TFT.fillrect( 10,215,100,285,Green);
nikitateggi 20:7c64e6ecad76 294 TFT.locate(30,245) ;
nikitateggi 20:7c64e6ecad76 295 TFT.printf("RET") ;
nikitateggi 20:7c64e6ecad76 296 TFT.fillrect(130,215,220,285,Green);
nikitateggi 20:7c64e6ecad76 297 TFT.locate(155,235) ; // changed // points // 13/06
nikitateggi 20:7c64e6ecad76 298 TFT.printf("RE-") ;
nikitateggi 20:7c64e6ecad76 299 TFT.locate(145,255) ;
nikitateggi 20:7c64e6ecad76 300 TFT.printf("TEST") ; */
nikitateggi 39:69b09bd87502 301 TFT.set_font((unsigned char*) Arial12x12);
nikitateggi 39:69b09bd87502 302 TFT.foreground(Navy) ;
nikitateggi 39:69b09bd87502 303 TFT.locate(5,291) ;
nikitateggi 39:69b09bd87502 304 TFT.printf("Study Readings: Not for medical") ; // added on 11/8/17 nikita
nikitateggi 39:69b09bd87502 305 TFT.locate(35,300) ;
nikitateggi 39:69b09bd87502 306 TFT.printf("diagnosis and treatment") ;
nikitateggi 39:69b09bd87502 307 TFT.set_font((unsigned char*) Arial24x23);
nikitateggi 20:7c64e6ecad76 308 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 309 backlight = 1 ;
nikitateggi 3:9a06c2bed650 310 }
nikitateggi 3:9a06c2bed650 311
nikitateggi 3:9a06c2bed650 312
nikitateggi 0:c47fb0c1bbf6 313
nikitateggi 0:c47fb0c1bbf6 314
nikitateggi 1:8316c23ec6b9 315 void screen_glc() // glc main screen
nikitateggi 0:c47fb0c1bbf6 316 {
nikitateggi 3:9a06c2bed650 317
nikitateggi 20:7c64e6ecad76 318 backlight = 0 ;
nikitateggi 7:11f926351d8f 319 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 320 TFT.background(Green) ;
nikitateggi 20:7c64e6ecad76 321 TFT.foreground(Black) ;
nikitateggi 20:7c64e6ecad76 322 TFT.fillrect(10,130,100,200,White);
nikitateggi 20:7c64e6ecad76 323 TFT.fillrect(130,130,220,200,White);
nikitateggi 20:7c64e6ecad76 324 TFT.fillrect(10,215,100,285,White);
nikitateggi 20:7c64e6ecad76 325 TFT.fillrect(130,215,220,285,White);
nikitateggi 20:7c64e6ecad76 326 // TFT.fillrect( 60,130,180,200,Green);
nikitateggi 20:7c64e6ecad76 327 // TFT.locate(80,150) ;
nikitateggi 20:7c64e6ecad76 328 // TFT.printf("START") ;
nikitateggi 20:7c64e6ecad76 329 TFT.fillrect( 10,130,100,200,Green);
nikitateggi 20:7c64e6ecad76 330 TFT.locate(30,160) ; // changed to 30 from 40
nikitateggi 20:7c64e6ecad76 331 TFT.printf("FBS") ;
nikitateggi 20:7c64e6ecad76 332 TFT.fillrect( 130,130,220,200,Green);
nikitateggi 20:7c64e6ecad76 333 TFT.locate(155,160) ;
nikitateggi 20:7c64e6ecad76 334 TFT.printf("PP") ;
nikitateggi 20:7c64e6ecad76 335 TFT.fillrect( 10,215,100,285,Green);
avp2417 35:43133f017ed4 336 TFT.locate(23,245) ; //changed from 20 to 23 //rashmi 22/7/17
nikitateggi 20:7c64e6ecad76 337 TFT.printf("RAN") ;
nikitateggi 20:7c64e6ecad76 338 TFT.fillrect(130,215,220,285,Green);
avp2417 35:43133f017ed4 339 TFT.locate(145,245); //changed from 150 to 145 //rashmi 22/7/17
nikitateggi 20:7c64e6ecad76 340 TFT.printf("MAIN") ;
nikitateggi 20:7c64e6ecad76 341 // TFT.fillrect( 60,230,180,300,Green);
nikitateggi 20:7c64e6ecad76 342 // TFT.locate(100,250) ;
nikitateggi 20:7c64e6ecad76 343 // TFT.printf("RET") ;
nikitateggi 7:11f926351d8f 344 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 345 backlight = 1 ;
nikitateggi 3:9a06c2bed650 346
nikitateggi 0:c47fb0c1bbf6 347 }
nikitateggi 0:c47fb0c1bbf6 348
nikitateggi 4:6bd81bb1790d 349
nikitateggi 4:6bd81bb1790d 350 void screen_bp2() //BP screen 3
nikitateggi 3:9a06c2bed650 351 {
nikitateggi 3:9a06c2bed650 352
nikitateggi 7:11f926351d8f 353 /* lcd.FillRoundRect(3,130,200,200,COLOR_BLACK);
nikitateggi 3:9a06c2bed650 354 lcd.FillRoundRect(60,230,180,300,COLOR_BLACK);
nikitateggi 7:11f926351d8f 355 lcd.FillRect(5,215,230,290,COLOR_BLACK);*/
nikitateggi 3:9a06c2bed650 356
nikitateggi 3:9a06c2bed650 357 }
nikitateggi 1:8316c23ec6b9 358
nikitateggi 1:8316c23ec6b9 359
nikitateggi 39:69b09bd87502 360 void ecg_countdown() // ECG measurement countdown
nikitateggi 1:8316c23ec6b9 361 {
nikitateggi 20:7c64e6ecad76 362 backlight = 0 ;
nikitateggi 7:11f926351d8f 363 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 364 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 365 TFT.foreground(Green) ;
nikitateggi 20:7c64e6ecad76 366 char tim1[5];
nikitateggi 39:69b09bd87502 367 TFT.fillrect(3,80,240,300,White); //changed on 11/8/17 nikita
nikitateggi 20:7c64e6ecad76 368 TFT.fillrect(60,230,180,300,White);
nikitateggi 20:7c64e6ecad76 369 TFT.fillrect(5,215,230,290,White);
nikitateggi 39:69b09bd87502 370 TFT.fillrect(5,230,240,320,White );
nikitateggi 20:7c64e6ecad76 371 TFT.locate(25,100) ;
nikitateggi 20:7c64e6ecad76 372 TFT.printf("ECG starts in") ;
nikitateggi 20:7c64e6ecad76 373 for(int i=5;i>=0;i--)
nikitateggi 20:7c64e6ecad76 374 {
nikitateggi 1:8316c23ec6b9 375 wait(1);
nikitateggi 1:8316c23ec6b9 376 sprintf (tim1, "%d",i);
nikitateggi 7:11f926351d8f 377 TFT.locate(120,120) ;
nikitateggi 20:7c64e6ecad76 378 TFT.printf(tim1) ;
nikitateggi 20:7c64e6ecad76 379 }
nikitateggi 39:69b09bd87502 380 TFT.fillrect(5,80,240,200,White);
nikitateggi 39:69b09bd87502 381 TFT.locate(35,110) ;
nikitateggi 39:69b09bd87502 382 TFT.printf("ECG Tst in") ; // added on 11/8/17 nikita
nikitateggi 39:69b09bd87502 383 TFT.locate(50,140) ;
nikitateggi 39:69b09bd87502 384 TFT.printf("progress") ;
nikitateggi 39:69b09bd87502 385 TFT.BusEnable(false) ;
nikitateggi 39:69b09bd87502 386 backlight = 1 ;
nikitateggi 7:11f926351d8f 387
nikitateggi 3:9a06c2bed650 388
nikitateggi 39:69b09bd87502 389 }
nikitateggi 1:8316c23ec6b9 390
suhasini 6:5e33a0f01476 391 void bp_countdown() // ECG measurement countdown
suhasini 6:5e33a0f01476 392 {
nikitateggi 20:7c64e6ecad76 393 backlight = 0 ;
nikitateggi 7:11f926351d8f 394 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 395 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 396 TFT.foreground(Green) ;
nikitateggi 20:7c64e6ecad76 397 char tim1[5];
nikitateggi 20:7c64e6ecad76 398 TFT.fillrect(3,130,200,200,White);
nikitateggi 20:7c64e6ecad76 399 TFT.fillrect(60,230,180,300,White);
nikitateggi 20:7c64e6ecad76 400 TFT.fillrect(1,80,240,290,White); //changed the points// 13/06
nikitateggi 39:69b09bd87502 401 TFT.fillrect(5,230,240,320,White ); //added 11/8/17
nikitateggi 20:7c64e6ecad76 402 TFT.locate(25,100) ;
nikitateggi 20:7c64e6ecad76 403 TFT.printf("BP starts in") ;
nikitateggi 20:7c64e6ecad76 404 for(int i=5;i>=0;i--)
suhasini 6:5e33a0f01476 405 {
suhasini 6:5e33a0f01476 406 wait(1);
suhasini 6:5e33a0f01476 407 sprintf (tim1, "%d",i);
nikitateggi 7:11f926351d8f 408 TFT.locate(120,120) ;
nikitateggi 20:7c64e6ecad76 409 TFT.printf(tim1) ;
suhasini 6:5e33a0f01476 410 }
nikitateggi 39:69b09bd87502 411 TFT.fillrect(5,80,240,200,White);
nikitateggi 39:69b09bd87502 412 TFT.locate(35,110) ;
nikitateggi 39:69b09bd87502 413 TFT.printf("BP Tst in") ; // added on 11/8/17 nikita
nikitateggi 39:69b09bd87502 414 TFT.locate(50,140) ;
nikitateggi 39:69b09bd87502 415 TFT.printf("progress") ;
nikitateggi 39:69b09bd87502 416
nikitateggi 7:11f926351d8f 417 TFT.BusEnable(false) ;
nikitateggi 7:11f926351d8f 418 backlight = 1 ;
nikitateggi 7:11f926351d8f 419 }
nikitateggi 1:8316c23ec6b9 420
nikitateggi 4:6bd81bb1790d 421 void screen_again() // screen to press 'yes' or 'no' to repeat the test
nikitateggi 7:11f926351d8f 422 {
nikitateggi 20:7c64e6ecad76 423 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 424 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 425 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 426 TFT.foreground(Black) ;
nikitateggi 20:7c64e6ecad76 427 TFT.fillrect(5,127,230,200,White);
nikitateggi 20:7c64e6ecad76 428 TFT.locate(50,130) ;
nikitateggi 20:7c64e6ecad76 429 TFT.printf("Take test") ;
nikitateggi 20:7c64e6ecad76 430 TFT.locate(75,160) ;
nikitateggi 20:7c64e6ecad76 431 TFT.printf("again?") ;
nikitateggi 20:7c64e6ecad76 432 TFT.background(Orange) ;
nikitateggi 20:7c64e6ecad76 433 TFT.locate(30,245) ;
nikitateggi 20:7c64e6ecad76 434 TFT.printf("YES") ;
nikitateggi 20:7c64e6ecad76 435 TFT.locate(135,245) ;
nikitateggi 20:7c64e6ecad76 436 TFT.printf(" NO ") ;
nikitateggi 20:7c64e6ecad76 437 backlight = 1 ;
nikitateggi 7:11f926351d8f 438 TFT.BusEnable(false) ;
nikitateggi 3:9a06c2bed650 439
nikitateggi 1:8316c23ec6b9 440 }
nikitateggi 1:8316c23ec6b9 441
nikitateggi 1:8316c23ec6b9 442
nikitateggi 4:6bd81bb1790d 443 void screen_glc_2() // GLC screen 3 after test
nikitateggi 1:8316c23ec6b9 444 {
nikitateggi 3:9a06c2bed650 445
nikitateggi 20:7c64e6ecad76 446 backlight = 0 ;
nikitateggi 7:11f926351d8f 447 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 448 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 449 TFT.foreground(Black) ;
nikitateggi 32:76892fdf5e4c 450 TFT.fillrect(10,215,230,290,White);
nikitateggi 20:7c64e6ecad76 451 //TFT.fillrect(60,230,180,300,Green);
nikitateggi 20:7c64e6ecad76 452 //TFT.locate(85,250) ;
nikitateggi 20:7c64e6ecad76 453 TFT.background(Green);
nikitateggi 20:7c64e6ecad76 454 //TFT.printf("RET") ;
nikitateggi 20:7c64e6ecad76 455 TFT.fillrect( 10,215,100,285,Green);
avp2417 35:43133f017ed4 456 TFT.locate(25,245) ; // changed from 30 to 25 //rashmi 22/7/17
nikitateggi 20:7c64e6ecad76 457 TFT.printf("MAIN") ;
nikitateggi 20:7c64e6ecad76 458 TFT.fillrect(130,215,220,285,Green);
nikitateggi 20:7c64e6ecad76 459 TFT.locate(155,235) ; // changed // points // 13/06
nikitateggi 20:7c64e6ecad76 460 TFT.printf("RE-") ;
nikitateggi 20:7c64e6ecad76 461 TFT.locate(140,255) ; // changed from 145 to 140
nikitateggi 20:7c64e6ecad76 462 TFT.printf("TEST") ;
nikitateggi 20:7c64e6ecad76 463 backlight = 1 ;
nikitateggi 20:7c64e6ecad76 464 TFT.BusEnable(false) ;
nikitateggi 7:11f926351d8f 465
nikitateggi 7:11f926351d8f 466
nikitateggi 7:11f926351d8f 467
nikitateggi 1:8316c23ec6b9 468 }
nikitateggi 1:8316c23ec6b9 469
nikitateggi 4:6bd81bb1790d 470
nikitateggi 4:6bd81bb1790d 471 void glc_1() // GLC screen
nikitateggi 7:11f926351d8f 472 {
nikitateggi 20:7c64e6ecad76 473 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 474 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 475 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 476 TFT.foreground(Magenta ) ;
nikitateggi 20:7c64e6ecad76 477 TFT.fillrect(3,130,200,200,White);
nikitateggi 20:7c64e6ecad76 478 TFT.fillrect(60,230,180,300,White);
nikitateggi 20:7c64e6ecad76 479 TFT.fillrect(5,215,230,290,White);
nikitateggi 20:7c64e6ecad76 480 TFT.fillrect( 130,130,220,200,White);
nikitateggi 39:69b09bd87502 481 TFT.fillrect( 5,95,220,200,White); //added 11/8/17//45 to 5 nikita
nikitateggi 39:69b09bd87502 482 TFT.fillrect(5,230,240,320,White );
nikitateggi 20:7c64e6ecad76 483 TFT.locate(5,130) ;
nikitateggi 20:7c64e6ecad76 484 TFT.printf("Blood Glucose") ;
nikitateggi 20:7c64e6ecad76 485 TFT.locate(5,160) ;
nikitateggi 20:7c64e6ecad76 486 TFT.printf("Insert strip") ;
nikitateggi 20:7c64e6ecad76 487 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 488 backlight = 1 ;
nikitateggi 7:11f926351d8f 489
nikitateggi 7:11f926351d8f 490
nikitateggi 7:11f926351d8f 491
nikitateggi 1:8316c23ec6b9 492 }
nikitateggi 1:8316c23ec6b9 493
nikitateggi 4:6bd81bb1790d 494 void glc_2() // GLC screen
nikitateggi 1:8316c23ec6b9 495 {
nikitateggi 20:7c64e6ecad76 496 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 497 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 498 TFT.locate(5,160) ;
nikitateggi 20:7c64e6ecad76 499 TFT.printf("Strip Detected") ;
nikitateggi 20:7c64e6ecad76 500 TFT.locate(5,190) ;
nikitateggi 20:7c64e6ecad76 501 TFT.printf("Insert Blood") ;
nikitateggi 20:7c64e6ecad76 502 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 503 backlight = 1 ;
nikitateggi 1:8316c23ec6b9 504 }
nikitateggi 0:c47fb0c1bbf6 505
nikitateggi 4:6bd81bb1790d 506
nikitateggi 4:6bd81bb1790d 507 void glc_3() // GLC screen
nikitateggi 1:8316c23ec6b9 508 {
nikitateggi 20:7c64e6ecad76 509 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 510 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 511 TFT.locate(5,190) ;
nikitateggi 20:7c64e6ecad76 512 TFT.printf("Blood Detected") ;
nikitateggi 20:7c64e6ecad76 513 TFT.locate( 5,220) ;
nikitateggi 20:7c64e6ecad76 514 TFT.printf("computing") ;
nikitateggi 20:7c64e6ecad76 515 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 516 backlight = 1 ;
nikitateggi 7:11f926351d8f 517 }
nikitateggi 1:8316c23ec6b9 518
nikitateggi 4:6bd81bb1790d 519
nidhinvarghese 15:208b146151ba 520 void glc_4(uint16_t mgdl) // GLC screen to display blood glucose level on the LCD
nikitateggi 7:11f926351d8f 521 {
nikitateggi 20:7c64e6ecad76 522 char buf[10];
nikitateggi 20:7c64e6ecad76 523 sprintf (buf, " BG %d mg/dl",mgdl);
nikitateggi 20:7c64e6ecad76 524 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 525 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 526 TFT.fillrect(5,127,230,320,White);
nikitateggi 20:7c64e6ecad76 527 TFT.locate(3,100) ;
nikitateggi 20:7c64e6ecad76 528 TFT.printf(" BG Tst Done ") ;
nikitateggi 20:7c64e6ecad76 529 TFT.locate(5,130) ;
nikitateggi 7:11f926351d8f 530 TFT.printf(buf) ;
nikitateggi 20:7c64e6ecad76 531 TFT.locate(5,160) ;
nikitateggi 20:7c64e6ecad76 532 TFT.printf("(Range 70-120 mg/dl)") ; // added 16/06
nikitateggi 39:69b09bd87502 533 TFT.set_font((unsigned char*) Arial12x12);
nikitateggi 39:69b09bd87502 534 TFT.foreground(Navy) ;
nikitateggi 39:69b09bd87502 535 TFT.locate(5,291) ;
nikitateggi 39:69b09bd87502 536 TFT.printf("Study Readings: Not for medical") ; // added on 11/8/17 nikita
nikitateggi 39:69b09bd87502 537 TFT.locate(35,300) ;
nikitateggi 39:69b09bd87502 538 TFT.printf("diagnosis and treatment") ;
nikitateggi 39:69b09bd87502 539 TFT.set_font((unsigned char*) Arial24x23);
nikitateggi 20:7c64e6ecad76 540 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 541 backlight = 1 ;
nikitateggi 20:7c64e6ecad76 542 }
nikitateggi 22:ffa88619551d 543
nikitateggi 22:ffa88619551d 544
avp2417 37:92fcbf22bf91 545 void battery_screen_nocharge()
nikitateggi 22:ffa88619551d 546 {
avp2417 37:92fcbf22bf91 547
avp2417 37:92fcbf22bf91 548
avp2417 37:92fcbf22bf91 549 backlight = 0 ;
avp2417 37:92fcbf22bf91 550 TFT.BusEnable(true) ;
avp2417 37:92fcbf22bf91 551 TFT.background(White) ;
avp2417 37:92fcbf22bf91 552 TFT.set_font((unsigned char*) Arial12x12);
avp2417 37:92fcbf22bf91 553 TFT.foreground(Red);
avp2417 37:92fcbf22bf91 554 TFT.locate(10,8) ;
avp2417 37:92fcbf22bf91 555 TFT.printf("No Charge") ;
avp2417 37:92fcbf22bf91 556 TFT.set_font((unsigned char*) Arial24x23);
avp2417 37:92fcbf22bf91 557 TFT.BusEnable(false) ;
avp2417 37:92fcbf22bf91 558 backlight = 1 ;
avp2417 37:92fcbf22bf91 559
avp2417 37:92fcbf22bf91 560
avp2417 37:92fcbf22bf91 561 }
avp2417 37:92fcbf22bf91 562
avp2417 37:92fcbf22bf91 563 void battery_screen_charge()
avp2417 37:92fcbf22bf91 564 {
nikitateggi 22:ffa88619551d 565 backlight = 0 ;
nikitateggi 22:ffa88619551d 566 TFT.BusEnable(true) ;
avp2417 37:92fcbf22bf91 567 TFT.background(White) ;
avp2417 37:92fcbf22bf91 568 TFT.set_font((unsigned char*) Arial12x12);
avp2417 37:92fcbf22bf91 569 TFT.foreground(Green);
avp2417 37:92fcbf22bf91 570 TFT.locate(10,8) ;
avp2417 37:92fcbf22bf91 571 TFT.printf("Battery Charged") ;
avp2417 37:92fcbf22bf91 572 TFT.set_font((unsigned char*) Arial24x23);
avp2417 37:92fcbf22bf91 573 TFT.BusEnable(false) ;
avp2417 37:92fcbf22bf91 574 backlight = 1 ;
avp2417 37:92fcbf22bf91 575
avp2417 37:92fcbf22bf91 576 }
avp2417 37:92fcbf22bf91 577
avp2417 37:92fcbf22bf91 578
avp2417 37:92fcbf22bf91 579
avp2417 37:92fcbf22bf91 580 void battery_critically_low_charge()
avp2417 37:92fcbf22bf91 581 {
avp2417 37:92fcbf22bf91 582 backlight = 0 ;
nikitateggi 22:ffa88619551d 583 TFT.BusEnable(true) ;
avp2417 37:92fcbf22bf91 584 TFT.background(White) ;
avp2417 37:92fcbf22bf91 585 TFT.set_font((unsigned char*) Arial12x12);
avp2417 37:92fcbf22bf91 586 TFT.foreground(Green);
avp2417 37:92fcbf22bf91 587 TFT.locate(10,8) ;
avp2417 37:92fcbf22bf91 588 TFT.printf("Critically Low") ;
avp2417 37:92fcbf22bf91 589 TFT.set_font((unsigned char*) Arial24x23);
avp2417 37:92fcbf22bf91 590 TFT.BusEnable(false) ;
avp2417 37:92fcbf22bf91 591 backlight = 1 ;
avp2417 37:92fcbf22bf91 592
avp2417 37:92fcbf22bf91 593 }
avp2417 37:92fcbf22bf91 594
avp2417 37:92fcbf22bf91 595 void battery_low_charge()
avp2417 37:92fcbf22bf91 596 {
avp2417 37:92fcbf22bf91 597 backlight = 0 ;
avp2417 37:92fcbf22bf91 598 TFT.BusEnable(true) ;
avp2417 37:92fcbf22bf91 599 TFT.background(White) ;
avp2417 37:92fcbf22bf91 600 TFT.set_font((unsigned char*) Arial12x12);
avp2417 37:92fcbf22bf91 601 TFT.foreground(Green);
avp2417 37:92fcbf22bf91 602 TFT.locate(10,8) ;
avp2417 37:92fcbf22bf91 603 TFT.printf("Low Battery") ;
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 35:43133f017ed4 609
avp2417 35:43133f017ed4 610 void screen_ecg_error()
nikitateggi 31:0f67acfc6236 611 {
nikitateggi 31:0f67acfc6236 612 backlight = 0 ;
nikitateggi 31:0f67acfc6236 613 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 614 TFT.background(White) ;
nikitateggi 31:0f67acfc6236 615 TFT.foreground(Red) ;
nikitateggi 39:69b09bd87502 616 TFT.fillrect(5,90,230,200,White); // added on 11/8/17 nikita
nikitateggi 31:0f67acfc6236 617 TFT.locate(50,100) ;
nikitateggi 31:0f67acfc6236 618 TFT.printf("ERROR!") ;
nikitateggi 31:0f67acfc6236 619 TFT.locate(20,130) ;
nikitateggi 31:0f67acfc6236 620 TFT.printf("Take ReTest") ;
nikitateggi 31:0f67acfc6236 621 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 622 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 623 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 624 backlight = 1 ;
nikitateggi 31:0f67acfc6236 625 }
nikitateggi 31:0f67acfc6236 626
nikitateggi 31:0f67acfc6236 627 void screen_bp_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 31:0f67acfc6236 633 TFT.fillrect(5,90,230,150,White);
nikitateggi 31:0f67acfc6236 634 TFT.locate(50,100) ;
nikitateggi 31:0f67acfc6236 635 TFT.printf("ERROR!") ;
nikitateggi 31:0f67acfc6236 636 TFT.locate(20,130) ;
nikitateggi 31:0f67acfc6236 637 TFT.printf("Take ReTest") ;
nikitateggi 31:0f67acfc6236 638 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 639 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 640 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 641 backlight = 1 ;
nikitateggi 31:0f67acfc6236 642 }
nikitateggi 31:0f67acfc6236 643
nikitateggi 31:0f67acfc6236 644
avp2417 35:43133f017ed4 645 void glc_error() //glc replace test strip
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 31:0f67acfc6236 651 TFT.fillrect(5,90,230,300,White);
avp2417 35:43133f017ed4 652 TFT.locate(60,100) ; //changed from 50 to 60 //rashmi 22/7/17
avp2417 35:43133f017ed4 653 TFT.printf("Replace") ;
avp2417 35:43133f017ed4 654 TFT.locate(40,130) ; //changed from 20 to 40 //rashmi 22/7/17
avp2417 35:43133f017ed4 655 TFT.printf("Test Strip") ;
nikitateggi 31:0f67acfc6236 656 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 657 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 658 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 659 backlight = 1 ;
nikitateggi 31:0f67acfc6236 660 }
nikitateggi 31:0f67acfc6236 661
nikitateggi 31:0f67acfc6236 662
avp2417 35:43133f017ed4 663 void BT_connection()
nikitateggi 31:0f67acfc6236 664 {
nikitateggi 31:0f67acfc6236 665 backlight = 0 ;
nikitateggi 31:0f67acfc6236 666 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 667 TFT.background(White) ;
nikitateggi 31:0f67acfc6236 668 TFT.foreground(Blue) ;
nikitateggi 31:0f67acfc6236 669 TFT.fillrect(5,90,230,300,White);
nikitateggi 31:0f67acfc6236 670 TFT.locate(40,140) ;
nikitateggi 31:0f67acfc6236 671 TFT.printf("Connected") ;
nikitateggi 31:0f67acfc6236 672 TFT.locate(20,170) ;
nikitateggi 31:0f67acfc6236 673 TFT.printf("Sending Files") ;
nikitateggi 31:0f67acfc6236 674 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 675 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 676 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 677 backlight = 1 ;
nikitateggi 31:0f67acfc6236 678 }
nikitateggi 31:0f67acfc6236 679
nikitateggi 31:0f67acfc6236 680 void BT_no_connection()
nikitateggi 31:0f67acfc6236 681 {
nikitateggi 31:0f67acfc6236 682 backlight = 0 ;
nikitateggi 31:0f67acfc6236 683 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 684 TFT.background(White) ;
nikitateggi 31:0f67acfc6236 685 TFT.foreground(Blue) ;
nikitateggi 31:0f67acfc6236 686 TFT.fillrect(5,90,230,300,White);
nikitateggi 31:0f67acfc6236 687 TFT.locate(80,140) ;
nikitateggi 31:0f67acfc6236 688 TFT.printf("Not") ;
nikitateggi 31:0f67acfc6236 689 TFT.locate(40,160) ;
nikitateggi 31:0f67acfc6236 690 TFT.printf("Connected") ;
nikitateggi 31:0f67acfc6236 691 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 692 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 693 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 694 backlight = 1 ;
nikitateggi 31:0f67acfc6236 695 }
nikitateggi 31:0f67acfc6236 696
nikitateggi 31:0f67acfc6236 697 void BT_finished()
nikitateggi 31:0f67acfc6236 698 {
nikitateggi 31:0f67acfc6236 699 backlight = 0 ;
nikitateggi 31:0f67acfc6236 700 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 701 TFT.background(White) ;
nikitateggi 31:0f67acfc6236 702 TFT.foreground(Blue) ;
nikitateggi 31:0f67acfc6236 703 TFT.fillrect(5,90,230,300,White);
nikitateggi 31:0f67acfc6236 704 TFT.locate(20,140) ;
nikitateggi 31:0f67acfc6236 705 TFT.printf("Files Tranfer") ;
nikitateggi 31:0f67acfc6236 706 TFT.locate(40,170) ;
nikitateggi 31:0f67acfc6236 707 TFT.printf("Completed") ;
nikitateggi 31:0f67acfc6236 708 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 709 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 710 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 711 backlight = 1 ;
nikitateggi 31:0f67acfc6236 712 }
nikitateggi 31:0f67acfc6236 713
nikitateggi 31:0f67acfc6236 714
nikitateggi 31:0f67acfc6236 715 void screen_BT_return() // BT main screen
nikitateggi 31:0f67acfc6236 716 {
nikitateggi 31:0f67acfc6236 717 backlight = 0 ;
nikitateggi 31:0f67acfc6236 718 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 719 TFT.background(Green) ;
nikitateggi 31:0f67acfc6236 720 TFT.foreground(Black) ;
nikitateggi 39:69b09bd87502 721 // TFT.fillrect(5,90,230,300,White);
nikitateggi 31:0f67acfc6236 722 TFT.fillrect( 60,230,180,300,Green);
nikitateggi 31:0f67acfc6236 723 TFT.locate(80,250) ;
nikitateggi 31:0f67acfc6236 724 TFT.printf("MAIN") ;
nikitateggi 31:0f67acfc6236 725 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 726 backlight = 1 ;
nikitateggi 31:0f67acfc6236 727
nikitateggi 31:0f67acfc6236 728 }
nikitateggi 31:0f67acfc6236 729
nikitateggi 31:0f67acfc6236 730
nikitateggi 31:0f67acfc6236 731 void screen_patient_info(uint32_t current_test_pid,uint32_t bt_file_sent_pid)
nikitateggi 31:0f67acfc6236 732 {
avp2417 35:43133f017ed4 733
nikitateggi 31:0f67acfc6236 734 char buf[10];
avp2417 35:43133f017ed4 735 sprintf (buf, "Test pid:%d",current_test_pid); //changed from 'current pid' to 'Test pid' //rashmi 24/7/17
nikitateggi 31:0f67acfc6236 736 backlight = 0 ;
nikitateggi 31:0f67acfc6236 737 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 738 TFT.background(White);
nikitateggi 31:0f67acfc6236 739 TFT.foreground(Blue);
nikitateggi 31:0f67acfc6236 740 TFT.fillrect(5,90,230,300,White);
avp2417 35:43133f017ed4 741 TFT.locate(15,140) ; //changed from 20 to 15 //rashmi 24/7/17
avp2417 35:43133f017ed4 742 TFT.printf(buf) ;
avp2417 35:43133f017ed4 743 sprintf (buf,"BT pid :%d",bt_file_sent_pid);
avp2417 35:43133f017ed4 744 TFT.locate(15,170) ; //changed from 20 to 15 //rashmi 24/7/17
nikitateggi 31:0f67acfc6236 745 TFT.printf(buf) ;
nikitateggi 31:0f67acfc6236 746 TFT.background(Green) ;
nikitateggi 31:0f67acfc6236 747 TFT.foreground(Black) ;
nikitateggi 31:0f67acfc6236 748 TFT.fillrect( 60,230,180,300,Green);
nikitateggi 31:0f67acfc6236 749 TFT.locate(80,250) ;
nikitateggi 31:0f67acfc6236 750 TFT.printf("MAIN") ;
nikitateggi 31:0f67acfc6236 751 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 752 backlight = 1 ;
nikitateggi 31:0f67acfc6236 753
nikitateggi 39:69b09bd87502 754 }
nikitateggi 39:69b09bd87502 755 void glc_error_test_strip_removed() //glc replace test strip// // added on 8/8/17 nikita
nikitateggi 39:69b09bd87502 756 {
nikitateggi 39:69b09bd87502 757 backlight = 0 ;
nikitateggi 39:69b09bd87502 758 TFT.BusEnable(true) ;
nikitateggi 39:69b09bd87502 759 TFT.background(White) ;
nikitateggi 39:69b09bd87502 760 TFT.foreground(Red) ;
nikitateggi 39:69b09bd87502 761 TFT.fillrect(5,90,230,300,White);
nikitateggi 39:69b09bd87502 762 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 763 TFT.printf("Test Strip") ;
nikitateggi 39:69b09bd87502 764 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 765 TFT.printf("Removed") ;
nikitateggi 39:69b09bd87502 766 //TFT.locate(45,160) ;
nikitateggi 39:69b09bd87502 767 // TFT.printf("") ;
nikitateggi 39:69b09bd87502 768 TFT.BusEnable(false) ;
nikitateggi 39:69b09bd87502 769 backlight = 1 ;
nikitateggi 39:69b09bd87502 770 }