Modification into 17th July New display demo code

Dependencies:   SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217

Fork of Ext_Demo_17July2017_newdis by SenseSemi

Committer:
avp2417
Date:
Sun Jul 23 16:50:59 2017 +0000
Revision:
34:8f6b0dc124e8
Parent:
32:76892fdf5e4c
Modification after review in 17th July New Display demo code

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);
nikitateggi 20:7c64e6ecad76 63 TFT.locate(90,250) ;
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 22:ffa88619551d 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 20:7c64e6ecad76 80 TFT.fillrect(60,130,180,200,White );
nikitateggi 20:7c64e6ecad76 81 TFT.fillrect(60,230,180,320,White ); // changed from 300 to 320
nikitateggi 7:11f926351d8f 82 TFT.set_font((unsigned char*) Arial24x23);
nikitateggi 20:7c64e6ecad76 83 TFT.foreground(Black);
nikitateggi 20:7c64e6ecad76 84 TFT.locate(10,50) ;
nikitateggi 7:11f926351d8f 85 TFT.printf("PATIENTID") ;
nikitateggi 20:7c64e6ecad76 86 TFT.locate(180,50) ;
nikitateggi 7:11f926351d8f 87 TFT.printf(buff2) ;
nikitateggi 20:7c64e6ecad76 88 TFT.background(Orange) ;
nikitateggi 20:7c64e6ecad76 89 TFT.foreground(Black);
nikitateggi 20:7c64e6ecad76 90 TFT.fillrect( 10,130,100,200,Orange);
nikitateggi 20:7c64e6ecad76 91 TFT.locate(40,160) ;
nikitateggi 20:7c64e6ecad76 92 TFT.printf("BG") ;
nikitateggi 20:7c64e6ecad76 93 TFT.fillrect( 130,130,220,200,Orange);
nikitateggi 20:7c64e6ecad76 94 TFT.locate(145,160) ;
nikitateggi 7:11f926351d8f 95 TFT.printf("ECG") ;
nikitateggi 20:7c64e6ecad76 96 TFT.fillrect( 10,215,100,285,Orange);
nikitateggi 20:7c64e6ecad76 97 TFT.locate(40,245) ;
nikitateggi 20:7c64e6ecad76 98 TFT.printf("BP") ;
nikitateggi 20:7c64e6ecad76 99 TFT.fillrect(130,215,220,285,Orange);
nikitateggi 20:7c64e6ecad76 100 TFT.locate(130,245) ;
nikitateggi 20:7c64e6ecad76 101 TFT.printf("HOME") ;
nikitateggi 7:11f926351d8f 102 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 103 backlight = 1 ;
nikitateggi 7:11f926351d8f 104 }
nikitateggi 1:8316c23ec6b9 105
nikitateggi 1:8316c23ec6b9 106
nikitateggi 0:c47fb0c1bbf6 107
nikitateggi 4:6bd81bb1790d 108 void screen_main_1() // System Configuration main screen
nikitateggi 1:8316c23ec6b9 109 {
nikitateggi 20:7c64e6ecad76 110 backlight = 0 ;
nikitateggi 7:11f926351d8f 111 TFT.BusEnable(true) ;
nikitateggi 7:11f926351d8f 112 TFT.background(GreenYellow) ;
nikitateggi 20:7c64e6ecad76 113 TFT.fillrect(5,127,230,320,White );
nikitateggi 7:11f926351d8f 114 // wait(0.1) ;
nikitateggi 7:11f926351d8f 115 TFT.set_font((unsigned char*) Arial24x23);
nikitateggi 20:7c64e6ecad76 116 TFT.foreground(Black);
nikitateggi 20:7c64e6ecad76 117 TFT.fillrect( 10,130,100,200,GreenYellow);
nikitateggi 20:7c64e6ecad76 118 TFT.locate(40,160) ;
nikitateggi 7:11f926351d8f 119 TFT.printf("BLE") ;
nikitateggi 20:7c64e6ecad76 120 TFT.fillrect( 130,130,220,200,GreenYellow);
nikitateggi 20:7c64e6ecad76 121 TFT.locate(135,160) ;
nikitateggi 7:11f926351d8f 122 TFT.printf("ERASE") ;
nikitateggi 20:7c64e6ecad76 123 TFT.fillrect( 10,215,100,285,GreenYellow);
nikitateggi 20:7c64e6ecad76 124 TFT.locate(30,245) ;
nikitateggi 20:7c64e6ecad76 125 TFT.printf("FILE") ;
nikitateggi 20:7c64e6ecad76 126 TFT.fillrect(130,215,220,285,GreenYellow);
nikitateggi 20:7c64e6ecad76 127 TFT.locate(130,245) ;
nikitateggi 20:7c64e6ecad76 128 TFT.printf("HOME") ;
nikitateggi 7:11f926351d8f 129 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 130 backlight = 1 ;
nikitateggi 7:11f926351d8f 131 }
nikitateggi 0:c47fb0c1bbf6 132
nikitateggi 0:c47fb0c1bbf6 133
nikitateggi 4:6bd81bb1790d 134 void screen_ecg() //ECG screen 1
nikitateggi 0:c47fb0c1bbf6 135 {
nikitateggi 20:7c64e6ecad76 136 backlight = 0 ;
nikitateggi 7:11f926351d8f 137 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 138 TFT.fillrect(10,130,100,200,White);
nikitateggi 20:7c64e6ecad76 139 TFT.fillrect(130,130,220,200,White);
nikitateggi 20:7c64e6ecad76 140 TFT.fillrect(130,215,220,285,White);
nikitateggi 20:7c64e6ecad76 141 TFT.fillrect(10,215,100,285,White);
nikitateggi 20:7c64e6ecad76 142 TFT.fillrect(60,130,180,200,White);
nikitateggi 20:7c64e6ecad76 143 TFT.background(Green) ;
nikitateggi 7:11f926351d8f 144 TFT.fillrect( 60,130,180,200,Green);
nikitateggi 20:7c64e6ecad76 145 TFT.locate(80,150) ;
nikitateggi 7:11f926351d8f 146 TFT.printf("START") ;
nikitateggi 20:7c64e6ecad76 147 TFT.fillrect( 60,230,180,300,Green);
nikitateggi 20:7c64e6ecad76 148 TFT.locate(85,250) ;
nikitateggi 20:7c64e6ecad76 149 TFT.printf("MAIN") ;
nikitateggi 7:11f926351d8f 150 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 151 backlight = 1 ;
nikitateggi 7:11f926351d8f 152
nikitateggi 7:11f926351d8f 153
nikitateggi 7:11f926351d8f 154
nikitateggi 3:9a06c2bed650 155
nikitateggi 1:8316c23ec6b9 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 20:7c64e6ecad76 175 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 176 backlight = 1 ;
nikitateggi 20:7c64e6ecad76 177 }
nikitateggi 20:7c64e6ecad76 178
nikitateggi 20:7c64e6ecad76 179 void screen_ecg_lead() // ECG screen for displaying no lead proper lead contact
nikitateggi 20:7c64e6ecad76 180 {
nikitateggi 20:7c64e6ecad76 181 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 182 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 183 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 184 TFT.foreground(Red) ;
nikitateggi 20:7c64e6ecad76 185 TFT.fillrect(5,90,230,150,White);
nikitateggi 20:7c64e6ecad76 186 TFT.locate(50,100) ;
nikitateggi 20:7c64e6ecad76 187 TFT.printf("Re-check") ;
nikitateggi 20:7c64e6ecad76 188 TFT.locate(3,130) ;
nikitateggi 20:7c64e6ecad76 189 TFT.printf("Lead Connection") ;
nikitateggi 20:7c64e6ecad76 190 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 191 backlight = 1 ;
nikitateggi 20:7c64e6ecad76 192 }
nikitateggi 20:7c64e6ecad76 193
nikitateggi 20:7c64e6ecad76 194
nikitateggi 20:7c64e6ecad76 195 void screen_ecg_lead_bp_fingerdetect() // ECG screen for displaying no lead proper lead contact
nikitateggi 20:7c64e6ecad76 196 {
nikitateggi 20:7c64e6ecad76 197 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 198 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 199 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 200 TFT.foreground(Red) ;
nikitateggi 20:7c64e6ecad76 201 TFT.fillrect(5,90,230,150,White);
nikitateggi 20:7c64e6ecad76 202 TFT.locate(20,100) ;
nikitateggi 20:7c64e6ecad76 203 TFT.printf("Re-check Leads") ;
nikitateggi 20:7c64e6ecad76 204 TFT.locate(50,130) ;
nikitateggi 20:7c64e6ecad76 205 TFT.printf("& finger ") ;
nikitateggi 20:7c64e6ecad76 206 TFT.locate(45,160) ;
nikitateggi 20:7c64e6ecad76 207 TFT.printf("placement") ;
nikitateggi 20:7c64e6ecad76 208 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 209 backlight = 1 ;
nikitateggi 20:7c64e6ecad76 210 }
nikitateggi 20:7c64e6ecad76 211
nikitateggi 20:7c64e6ecad76 212 void screen_ecg_bp() // added screen dispaly text //14/06
nikitateggi 20:7c64e6ecad76 213 { backlight = 0 ;
nikitateggi 20:7c64e6ecad76 214 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 215 TFT.background(Green) ;
nikitateggi 20:7c64e6ecad76 216 TFT.fillrect(10,215,230,290,White);
nikitateggi 20:7c64e6ecad76 217 //TFT.fillrect(60,230,180,300,Green);
nikitateggi 20:7c64e6ecad76 218 //TFT.locate(100,250) ;
nikitateggi 20:7c64e6ecad76 219 TFT.foreground(Black) ;
nikitateggi 20:7c64e6ecad76 220 // TFT.printf("RET") ;
nikitateggi 20:7c64e6ecad76 221 TFT.fillrect( 10,215,100,285,Green);
nikitateggi 20:7c64e6ecad76 222 TFT.locate(30,245) ;
nikitateggi 20:7c64e6ecad76 223 TFT.printf("MAIN") ;
nikitateggi 20:7c64e6ecad76 224 TFT.fillrect(130,215,220,285,Green);
nikitateggi 20:7c64e6ecad76 225 TFT.locate(155,235) ; // changed // points // 13/06
nikitateggi 20:7c64e6ecad76 226 TFT.printf("RE-") ;
nikitateggi 20:7c64e6ecad76 227 TFT.locate(145,255) ;
nikitateggi 20:7c64e6ecad76 228 TFT.printf("TEST") ;
nikitateggi 20:7c64e6ecad76 229 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 230 backlight = 1 ;
nikitateggi 3:9a06c2bed650 231
nikitateggi 1:8316c23ec6b9 232 }
nikitateggi 1:8316c23ec6b9 233
nikitateggi 1:8316c23ec6b9 234
nikitateggi 0:c47fb0c1bbf6 235
nikitateggi 4:6bd81bb1790d 236 void screen_bp() // BP main screen
nikitateggi 0:c47fb0c1bbf6 237 {
nikitateggi 7:11f926351d8f 238 backlight = 0 ;
nikitateggi 7:11f926351d8f 239 TFT.BusEnable(true) ;
nikitateggi 7:11f926351d8f 240 TFT.background(Green) ;
nikitateggi 7:11f926351d8f 241 TFT.foreground(Black) ;
nikitateggi 7:11f926351d8f 242 TFT.fillrect(10,130,100,200,White);
nikitateggi 7:11f926351d8f 243 TFT.fillrect(130,130,220,200,White);
nikitateggi 7:11f926351d8f 244 TFT.fillrect(10,215,100,285,White);
nikitateggi 7:11f926351d8f 245 TFT.fillrect(130,215,220,285,White);
nikitateggi 7:11f926351d8f 246 TFT.fillrect( 60,130,180,200,Green);
nikitateggi 7:11f926351d8f 247 TFT.locate(80,150) ;
nikitateggi 7:11f926351d8f 248 TFT.printf("START") ;
nikitateggi 7:11f926351d8f 249 TFT.fillrect( 60,230,180,300,Green);
nikitateggi 7:11f926351d8f 250 TFT.locate(100,250) ;
nikitateggi 20:7c64e6ecad76 251 TFT.printf("MAIN") ;
nikitateggi 7:11f926351d8f 252 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 253 backlight = 1 ;
nikitateggi 3:9a06c2bed650 254
nikitateggi 3:9a06c2bed650 255 }
nikitateggi 3:9a06c2bed650 256
nikitateggi 4:6bd81bb1790d 257
nikitateggi 4:6bd81bb1790d 258 void screen_bp1(float SBP, float DBP) // BP screen 2
nikitateggi 3:9a06c2bed650 259 {
nikitateggi 7:11f926351d8f 260 backlight = 0 ;
nikitateggi 7:11f926351d8f 261 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 262 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 263 TFT.foreground(Green) ;
nikitateggi 20:7c64e6ecad76 264 char buf[10];
nikitateggi 20:7c64e6ecad76 265 TFT.fillrect(3,130,200,200,White);
nikitateggi 20:7c64e6ecad76 266 TFT.fillrect(60,230,180,300,White);
nikitateggi 20:7c64e6ecad76 267 TFT.locate(3,100) ;
nikitateggi 20:7c64e6ecad76 268 TFT.printf(" BP Tst Done ") ;
nikitateggi 20:7c64e6ecad76 269 sprintf (buf, "SBP: %.0f ",SBP); // changed to display 2 digits after decimal point, 2May'17 Changed to Integer
nikitateggi 20:7c64e6ecad76 270 TFT.locate(5,140) ; // changed 100 to 150
nikitateggi 7:11f926351d8f 271 TFT.printf(buf) ;
nikitateggi 20:7c64e6ecad76 272 sprintf (buf, "DBP: %.0f",DBP); // changed to display 2 digits after decimal point, 2May'17, Changed to integer
nikitateggi 20:7c64e6ecad76 273 TFT.locate(5,170) ; // CHANGED from 150 to 170
nikitateggi 20:7c64e6ecad76 274 TFT.printf(buf) ;
nikitateggi 20:7c64e6ecad76 275 //TFT.fillrect(60,230,180,300,Green);
nikitateggi 20:7c64e6ecad76 276 //TFT.locate(85,250) ;
nikitateggi 20:7c64e6ecad76 277 /* TFT.foreground(Black) ; // commented //16/06
nikitateggi 20:7c64e6ecad76 278 TFT.background(Green) ;
nikitateggi 20:7c64e6ecad76 279 //TFT.printf("RET") ;
nikitateggi 20:7c64e6ecad76 280 TFT.fillrect( 10,215,100,285,Green);
nikitateggi 20:7c64e6ecad76 281 TFT.locate(30,245) ;
nikitateggi 20:7c64e6ecad76 282 TFT.printf("RET") ;
nikitateggi 20:7c64e6ecad76 283 TFT.fillrect(130,215,220,285,Green);
nikitateggi 20:7c64e6ecad76 284 TFT.locate(155,235) ; // changed // points // 13/06
nikitateggi 20:7c64e6ecad76 285 TFT.printf("RE-") ;
nikitateggi 20:7c64e6ecad76 286 TFT.locate(145,255) ;
nikitateggi 20:7c64e6ecad76 287 TFT.printf("TEST") ; */
nikitateggi 20:7c64e6ecad76 288 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 289 backlight = 1 ;
nikitateggi 3:9a06c2bed650 290 }
nikitateggi 3:9a06c2bed650 291
nikitateggi 3:9a06c2bed650 292
nikitateggi 3:9a06c2bed650 293
nikitateggi 0:c47fb0c1bbf6 294
nikitateggi 0:c47fb0c1bbf6 295
nikitateggi 1:8316c23ec6b9 296 void screen_glc() // glc main screen
nikitateggi 0:c47fb0c1bbf6 297 {
nikitateggi 3:9a06c2bed650 298
nikitateggi 20:7c64e6ecad76 299 backlight = 0 ;
nikitateggi 7:11f926351d8f 300 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 301 TFT.background(Green) ;
nikitateggi 20:7c64e6ecad76 302 TFT.foreground(Black) ;
nikitateggi 20:7c64e6ecad76 303 TFT.fillrect(10,130,100,200,White);
nikitateggi 20:7c64e6ecad76 304 TFT.fillrect(130,130,220,200,White);
nikitateggi 20:7c64e6ecad76 305 TFT.fillrect(10,215,100,285,White);
nikitateggi 20:7c64e6ecad76 306 TFT.fillrect(130,215,220,285,White);
nikitateggi 20:7c64e6ecad76 307 // TFT.fillrect( 60,130,180,200,Green);
nikitateggi 20:7c64e6ecad76 308 // TFT.locate(80,150) ;
nikitateggi 20:7c64e6ecad76 309 // TFT.printf("START") ;
nikitateggi 20:7c64e6ecad76 310 TFT.fillrect( 10,130,100,200,Green);
nikitateggi 20:7c64e6ecad76 311 TFT.locate(30,160) ; // changed to 30 from 40
nikitateggi 20:7c64e6ecad76 312 TFT.printf("FBS") ;
nikitateggi 20:7c64e6ecad76 313 TFT.fillrect( 130,130,220,200,Green);
nikitateggi 20:7c64e6ecad76 314 TFT.locate(155,160) ;
nikitateggi 20:7c64e6ecad76 315 TFT.printf("PP") ;
nikitateggi 20:7c64e6ecad76 316 TFT.fillrect( 10,215,100,285,Green);
nikitateggi 20:7c64e6ecad76 317 TFT.locate(20,245) ;
nikitateggi 20:7c64e6ecad76 318 TFT.printf("RAN") ;
nikitateggi 20:7c64e6ecad76 319 TFT.fillrect(130,215,220,285,Green);
nikitateggi 20:7c64e6ecad76 320 TFT.locate(155,245);
nikitateggi 20:7c64e6ecad76 321 TFT.printf("MAIN") ;
nikitateggi 20:7c64e6ecad76 322 // TFT.fillrect( 60,230,180,300,Green);
nikitateggi 20:7c64e6ecad76 323 // TFT.locate(100,250) ;
nikitateggi 20:7c64e6ecad76 324 // TFT.printf("RET") ;
nikitateggi 7:11f926351d8f 325 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 326 backlight = 1 ;
nikitateggi 3:9a06c2bed650 327
nikitateggi 0:c47fb0c1bbf6 328 }
nikitateggi 0:c47fb0c1bbf6 329
nikitateggi 4:6bd81bb1790d 330
nikitateggi 4:6bd81bb1790d 331 void screen_bp2() //BP screen 3
nikitateggi 3:9a06c2bed650 332 {
nikitateggi 3:9a06c2bed650 333
nikitateggi 7:11f926351d8f 334 /* lcd.FillRoundRect(3,130,200,200,COLOR_BLACK);
nikitateggi 3:9a06c2bed650 335 lcd.FillRoundRect(60,230,180,300,COLOR_BLACK);
nikitateggi 7:11f926351d8f 336 lcd.FillRect(5,215,230,290,COLOR_BLACK);*/
nikitateggi 3:9a06c2bed650 337
nikitateggi 3:9a06c2bed650 338 }
nikitateggi 1:8316c23ec6b9 339
nikitateggi 1:8316c23ec6b9 340
nikitateggi 4:6bd81bb1790d 341 void ecg_countdown() // ECG measurement countdown
nikitateggi 1:8316c23ec6b9 342 {
nikitateggi 20:7c64e6ecad76 343 backlight = 0 ;
nikitateggi 7:11f926351d8f 344 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 345 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 346 TFT.foreground(Green) ;
nikitateggi 20:7c64e6ecad76 347 char tim1[5];
nikitateggi 20:7c64e6ecad76 348 TFT.fillrect(3,130,200,200,White);
nikitateggi 20:7c64e6ecad76 349 TFT.fillrect(60,230,180,300,White);
nikitateggi 20:7c64e6ecad76 350 TFT.fillrect(5,215,230,290,White);
nikitateggi 20:7c64e6ecad76 351 TFT.locate(25,100) ;
nikitateggi 20:7c64e6ecad76 352 TFT.printf("ECG starts in") ;
nikitateggi 20:7c64e6ecad76 353 for(int i=5;i>=0;i--)
nikitateggi 20:7c64e6ecad76 354 {
nikitateggi 1:8316c23ec6b9 355 wait(1);
nikitateggi 1:8316c23ec6b9 356 sprintf (tim1, "%d",i);
nikitateggi 7:11f926351d8f 357 TFT.locate(120,120) ;
nikitateggi 20:7c64e6ecad76 358 TFT.printf(tim1) ;
nikitateggi 20:7c64e6ecad76 359 }
nikitateggi 7:11f926351d8f 360 TFT.BusEnable(false) ;
nikitateggi 7:11f926351d8f 361 backlight = 1 ;
nikitateggi 7:11f926351d8f 362
nikitateggi 3:9a06c2bed650 363
nikitateggi 1:8316c23ec6b9 364 }
nikitateggi 1:8316c23ec6b9 365
suhasini 6:5e33a0f01476 366 void bp_countdown() // ECG measurement countdown
suhasini 6:5e33a0f01476 367 {
nikitateggi 20:7c64e6ecad76 368 backlight = 0 ;
nikitateggi 7:11f926351d8f 369 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 370 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 371 TFT.foreground(Green) ;
nikitateggi 20:7c64e6ecad76 372 char tim1[5];
nikitateggi 20:7c64e6ecad76 373 TFT.fillrect(3,130,200,200,White);
nikitateggi 20:7c64e6ecad76 374 TFT.fillrect(60,230,180,300,White);
nikitateggi 20:7c64e6ecad76 375 TFT.fillrect(1,80,240,290,White); //changed the points// 13/06
nikitateggi 20:7c64e6ecad76 376 TFT.locate(25,100) ;
nikitateggi 20:7c64e6ecad76 377 TFT.printf("BP starts in") ;
nikitateggi 20:7c64e6ecad76 378 for(int i=5;i>=0;i--)
suhasini 6:5e33a0f01476 379 {
suhasini 6:5e33a0f01476 380 wait(1);
suhasini 6:5e33a0f01476 381 sprintf (tim1, "%d",i);
nikitateggi 7:11f926351d8f 382 TFT.locate(120,120) ;
nikitateggi 20:7c64e6ecad76 383 TFT.printf(tim1) ;
suhasini 6:5e33a0f01476 384 }
nikitateggi 7:11f926351d8f 385 TFT.BusEnable(false) ;
nikitateggi 7:11f926351d8f 386 backlight = 1 ;
nikitateggi 7:11f926351d8f 387 }
nikitateggi 1:8316c23ec6b9 388
nikitateggi 4:6bd81bb1790d 389 void screen_again() // screen to press 'yes' or 'no' to repeat the test
nikitateggi 7:11f926351d8f 390 {
nikitateggi 20:7c64e6ecad76 391 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 392 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 393 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 394 TFT.foreground(Black) ;
nikitateggi 20:7c64e6ecad76 395 TFT.fillrect(5,127,230,200,White);
nikitateggi 20:7c64e6ecad76 396 TFT.locate(50,130) ;
nikitateggi 20:7c64e6ecad76 397 TFT.printf("Take test") ;
nikitateggi 20:7c64e6ecad76 398 TFT.locate(75,160) ;
nikitateggi 20:7c64e6ecad76 399 TFT.printf("again?") ;
nikitateggi 20:7c64e6ecad76 400 TFT.background(Orange) ;
nikitateggi 20:7c64e6ecad76 401 TFT.locate(30,245) ;
nikitateggi 20:7c64e6ecad76 402 TFT.printf("YES") ;
nikitateggi 20:7c64e6ecad76 403 TFT.locate(135,245) ;
nikitateggi 20:7c64e6ecad76 404 TFT.printf(" NO ") ;
nikitateggi 20:7c64e6ecad76 405 backlight = 1 ;
nikitateggi 7:11f926351d8f 406 TFT.BusEnable(false) ;
nikitateggi 3:9a06c2bed650 407
nikitateggi 1:8316c23ec6b9 408 }
nikitateggi 1:8316c23ec6b9 409
nikitateggi 1:8316c23ec6b9 410
nikitateggi 4:6bd81bb1790d 411 void screen_glc_2() // GLC screen 3 after test
nikitateggi 1:8316c23ec6b9 412 {
nikitateggi 3:9a06c2bed650 413
nikitateggi 20:7c64e6ecad76 414 backlight = 0 ;
nikitateggi 7:11f926351d8f 415 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 416 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 417 TFT.foreground(Black) ;
nikitateggi 32:76892fdf5e4c 418 TFT.fillrect(10,215,230,290,White);
nikitateggi 20:7c64e6ecad76 419 //TFT.fillrect(60,230,180,300,Green);
nikitateggi 20:7c64e6ecad76 420 //TFT.locate(85,250) ;
nikitateggi 20:7c64e6ecad76 421 TFT.background(Green);
nikitateggi 20:7c64e6ecad76 422 //TFT.printf("RET") ;
nikitateggi 20:7c64e6ecad76 423 TFT.fillrect( 10,215,100,285,Green);
nikitateggi 20:7c64e6ecad76 424 TFT.locate(30,245) ;
nikitateggi 20:7c64e6ecad76 425 TFT.printf("MAIN") ;
nikitateggi 20:7c64e6ecad76 426 TFT.fillrect(130,215,220,285,Green);
nikitateggi 20:7c64e6ecad76 427 TFT.locate(155,235) ; // changed // points // 13/06
nikitateggi 20:7c64e6ecad76 428 TFT.printf("RE-") ;
nikitateggi 20:7c64e6ecad76 429 TFT.locate(140,255) ; // changed from 145 to 140
nikitateggi 20:7c64e6ecad76 430 TFT.printf("TEST") ;
nikitateggi 20:7c64e6ecad76 431 backlight = 1 ;
nikitateggi 20:7c64e6ecad76 432 TFT.BusEnable(false) ;
nikitateggi 7:11f926351d8f 433
nikitateggi 7:11f926351d8f 434
nikitateggi 7:11f926351d8f 435
nikitateggi 1:8316c23ec6b9 436 }
nikitateggi 1:8316c23ec6b9 437
nikitateggi 4:6bd81bb1790d 438
nikitateggi 4:6bd81bb1790d 439 void glc_1() // GLC screen
nikitateggi 7:11f926351d8f 440 {
nikitateggi 20:7c64e6ecad76 441 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 442 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 443 TFT.background(White) ;
nikitateggi 20:7c64e6ecad76 444 TFT.foreground(Magenta ) ;
nikitateggi 20:7c64e6ecad76 445 TFT.fillrect(3,130,200,200,White);
nikitateggi 20:7c64e6ecad76 446 TFT.fillrect(60,230,180,300,White);
nikitateggi 20:7c64e6ecad76 447 TFT.fillrect(5,215,230,290,White);
nikitateggi 20:7c64e6ecad76 448 TFT.fillrect( 130,130,220,200,White);
nikitateggi 20:7c64e6ecad76 449 TFT.locate(5,130) ;
nikitateggi 20:7c64e6ecad76 450 TFT.printf("Blood Glucose") ;
nikitateggi 20:7c64e6ecad76 451 TFT.locate(5,160) ;
nikitateggi 20:7c64e6ecad76 452 TFT.printf("Insert strip") ;
nikitateggi 20:7c64e6ecad76 453 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 454 backlight = 1 ;
nikitateggi 7:11f926351d8f 455
nikitateggi 7:11f926351d8f 456
nikitateggi 7:11f926351d8f 457
nikitateggi 1:8316c23ec6b9 458 }
nikitateggi 1:8316c23ec6b9 459
nikitateggi 4:6bd81bb1790d 460 void glc_2() // GLC screen
nikitateggi 1:8316c23ec6b9 461 {
nikitateggi 20:7c64e6ecad76 462 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 463 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 464 TFT.locate(5,160) ;
nikitateggi 20:7c64e6ecad76 465 TFT.printf("Strip Detected") ;
nikitateggi 20:7c64e6ecad76 466 TFT.locate(5,190) ;
nikitateggi 20:7c64e6ecad76 467 TFT.printf("Insert Blood") ;
nikitateggi 20:7c64e6ecad76 468 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 469 backlight = 1 ;
nikitateggi 1:8316c23ec6b9 470 }
nikitateggi 0:c47fb0c1bbf6 471
nikitateggi 4:6bd81bb1790d 472
nikitateggi 4:6bd81bb1790d 473 void glc_3() // GLC screen
nikitateggi 1:8316c23ec6b9 474 {
nikitateggi 20:7c64e6ecad76 475 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 476 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 477 TFT.locate(5,190) ;
nikitateggi 20:7c64e6ecad76 478 TFT.printf("Blood Detected") ;
nikitateggi 20:7c64e6ecad76 479 TFT.locate( 5,220) ;
nikitateggi 20:7c64e6ecad76 480 TFT.printf("computing") ;
nikitateggi 20:7c64e6ecad76 481 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 482 backlight = 1 ;
nikitateggi 7:11f926351d8f 483 }
nikitateggi 1:8316c23ec6b9 484
nikitateggi 4:6bd81bb1790d 485
nidhinvarghese 15:208b146151ba 486 void glc_4(uint16_t mgdl) // GLC screen to display blood glucose level on the LCD
nikitateggi 7:11f926351d8f 487 {
nikitateggi 20:7c64e6ecad76 488 char buf[10];
nikitateggi 20:7c64e6ecad76 489 sprintf (buf, " BG %d mg/dl",mgdl);
nikitateggi 20:7c64e6ecad76 490 backlight = 0 ;
nikitateggi 20:7c64e6ecad76 491 TFT.BusEnable(true) ;
nikitateggi 20:7c64e6ecad76 492 TFT.fillrect(5,127,230,320,White);
nikitateggi 20:7c64e6ecad76 493 TFT.locate(3,100) ;
nikitateggi 20:7c64e6ecad76 494 TFT.printf(" BG Tst Done ") ;
nikitateggi 20:7c64e6ecad76 495 TFT.locate(5,130) ;
nikitateggi 7:11f926351d8f 496 TFT.printf(buf) ;
nikitateggi 20:7c64e6ecad76 497 TFT.locate(5,160) ;
nikitateggi 20:7c64e6ecad76 498 TFT.printf("(Range 70-120 mg/dl)") ; // added 16/06
nikitateggi 20:7c64e6ecad76 499 TFT.BusEnable(false) ;
nikitateggi 20:7c64e6ecad76 500 backlight = 1 ;
nikitateggi 20:7c64e6ecad76 501 }
nikitateggi 22:ffa88619551d 502
nikitateggi 22:ffa88619551d 503
nikitateggi 22:ffa88619551d 504 void bat_screen_nocharge()
nikitateggi 22:ffa88619551d 505 {
nikitateggi 22:ffa88619551d 506
nikitateggi 22:ffa88619551d 507 /* lcd.FillRect(10,10,20,40,COLOR_RED);
nikitateggi 22:ffa88619551d 508 lcd.FillRect(5,127,230,200,COLOR_BLACK);
nikitateggi 22:ffa88619551d 509 lcd.FillRoundRect(60,230,180,300,COLOR_BLACK);
nikitateggi 22:ffa88619551d 510 lcd.Print( "Low battery",60,130 ,COLOR_RED,COLOR_BLACK, 0);
nikitateggi 22:ffa88619551d 511 lcd.Print( "Connect",60,160 ,COLOR_RED,COLOR_BLACK, 0);
nikitateggi 22:ffa88619551d 512 lcd.Print( "Charger",30,205,COLOR_RED,COLOR_BLACK,0); */
nikitateggi 22:ffa88619551d 513
nikitateggi 22:ffa88619551d 514 backlight = 0 ;
nikitateggi 22:ffa88619551d 515 TFT.BusEnable(true) ;
nikitateggi 22:ffa88619551d 516 TFT.fillrect(10,10,20,40,Red);
nikitateggi 22:ffa88619551d 517 TFT.fillrect(5,127,230,200,White);
nikitateggi 22:ffa88619551d 518 TFT.fillrect(60,230,180,300,White);
nikitateggi 22:ffa88619551d 519 TFT.locate(60,130) ;
nikitateggi 22:ffa88619551d 520 TFT.printf("Low battery") ;
nikitateggi 22:ffa88619551d 521
nikitateggi 22:ffa88619551d 522
nikitateggi 22:ffa88619551d 523
nikitateggi 22:ffa88619551d 524 TFT.BusEnable(false) ;
nikitateggi 22:ffa88619551d 525 backlight = 1 ;
nikitateggi 22:ffa88619551d 526
nikitateggi 22:ffa88619551d 527 }
nikitateggi 22:ffa88619551d 528
nikitateggi 22:ffa88619551d 529 void bat_screen_charge()
nikitateggi 22:ffa88619551d 530 {
nikitateggi 22:ffa88619551d 531
nikitateggi 22:ffa88619551d 532 // lcd.FillRect(10,10,20,40,COLOR_GREEN);
nikitateggi 22:ffa88619551d 533 backlight = 0 ;
nikitateggi 22:ffa88619551d 534 TFT.BusEnable(true) ;
nikitateggi 22:ffa88619551d 535 TFT.fillrect(10,10,20,40,Green);
nikitateggi 22:ffa88619551d 536 TFT.BusEnable(false) ;
nikitateggi 22:ffa88619551d 537 backlight = 1 ;
nikitateggi 22:ffa88619551d 538 }
nikitateggi 31:0f67acfc6236 539 void screen_ecg_error()
nikitateggi 31:0f67acfc6236 540 {
nikitateggi 31:0f67acfc6236 541 backlight = 0 ;
nikitateggi 31:0f67acfc6236 542 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 543 TFT.background(White) ;
nikitateggi 31:0f67acfc6236 544 TFT.foreground(Red) ;
nikitateggi 31:0f67acfc6236 545 TFT.fillrect(5,90,230,150,White);
nikitateggi 31:0f67acfc6236 546 TFT.locate(50,100) ;
nikitateggi 31:0f67acfc6236 547 TFT.printf("ERROR!") ;
nikitateggi 31:0f67acfc6236 548 TFT.locate(20,130) ;
nikitateggi 31:0f67acfc6236 549 TFT.printf("Take ReTest") ;
nikitateggi 31:0f67acfc6236 550 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 551 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 552 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 553 backlight = 1 ;
nikitateggi 31:0f67acfc6236 554 }
nikitateggi 31:0f67acfc6236 555
nikitateggi 31:0f67acfc6236 556 void screen_bp_error()
nikitateggi 31:0f67acfc6236 557 {
nikitateggi 31:0f67acfc6236 558 backlight = 0 ;
nikitateggi 31:0f67acfc6236 559 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 560 TFT.background(White) ;
nikitateggi 31:0f67acfc6236 561 TFT.foreground(Red) ;
nikitateggi 31:0f67acfc6236 562 TFT.fillrect(5,90,230,150,White);
nikitateggi 31:0f67acfc6236 563 TFT.locate(50,100) ;
nikitateggi 31:0f67acfc6236 564 TFT.printf("ERROR!") ;
nikitateggi 31:0f67acfc6236 565 TFT.locate(20,130) ;
nikitateggi 31:0f67acfc6236 566 TFT.printf("Take ReTest") ;
nikitateggi 31:0f67acfc6236 567 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 568 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 569 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 570 backlight = 1 ;
nikitateggi 31:0f67acfc6236 571 }
nikitateggi 31:0f67acfc6236 572
nikitateggi 31:0f67acfc6236 573
nikitateggi 31:0f67acfc6236 574 void glc_error()
nikitateggi 31:0f67acfc6236 575 {
nikitateggi 31:0f67acfc6236 576 backlight = 0 ;
nikitateggi 31:0f67acfc6236 577 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 578 TFT.background(White) ;
nikitateggi 31:0f67acfc6236 579 TFT.foreground(Red) ;
nikitateggi 31:0f67acfc6236 580 TFT.fillrect(5,90,230,300,White);
nikitateggi 31:0f67acfc6236 581 TFT.locate(50,100) ;
nikitateggi 31:0f67acfc6236 582 TFT.printf("ERROR!") ;
nikitateggi 31:0f67acfc6236 583 TFT.locate(20,130) ;
nikitateggi 31:0f67acfc6236 584 TFT.printf("Take ReTest") ;
nikitateggi 31:0f67acfc6236 585 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 586 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 587 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 588 backlight = 1 ;
nikitateggi 31:0f67acfc6236 589 }
nikitateggi 31:0f67acfc6236 590
nikitateggi 31:0f67acfc6236 591
nikitateggi 31:0f67acfc6236 592 void BT_connection()
nikitateggi 31:0f67acfc6236 593 {
nikitateggi 31:0f67acfc6236 594 backlight = 0 ;
nikitateggi 31:0f67acfc6236 595 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 596 TFT.background(White) ;
nikitateggi 31:0f67acfc6236 597 TFT.foreground(Blue) ;
nikitateggi 31:0f67acfc6236 598 TFT.fillrect(5,90,230,300,White);
nikitateggi 31:0f67acfc6236 599 TFT.locate(40,140) ;
nikitateggi 31:0f67acfc6236 600 TFT.printf("Connected") ;
nikitateggi 31:0f67acfc6236 601 TFT.locate(20,170) ;
nikitateggi 31:0f67acfc6236 602 TFT.printf("Sending Files") ;
nikitateggi 31:0f67acfc6236 603 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 604 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 605 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 606 backlight = 1 ;
nikitateggi 31:0f67acfc6236 607 }
nikitateggi 31:0f67acfc6236 608
nikitateggi 31:0f67acfc6236 609 void BT_no_connection()
nikitateggi 31:0f67acfc6236 610 {
nikitateggi 31:0f67acfc6236 611 backlight = 0 ;
nikitateggi 31:0f67acfc6236 612 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 613 TFT.background(White) ;
nikitateggi 31:0f67acfc6236 614 TFT.foreground(Blue) ;
nikitateggi 31:0f67acfc6236 615 TFT.fillrect(5,90,230,300,White);
nikitateggi 31:0f67acfc6236 616 TFT.locate(80,140) ;
nikitateggi 31:0f67acfc6236 617 TFT.printf("Not") ;
nikitateggi 31:0f67acfc6236 618 TFT.locate(40,160) ;
nikitateggi 31:0f67acfc6236 619 TFT.printf("Connected") ;
nikitateggi 31:0f67acfc6236 620 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 621 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 622 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 623 backlight = 1 ;
nikitateggi 31:0f67acfc6236 624 }
nikitateggi 31:0f67acfc6236 625
nikitateggi 31:0f67acfc6236 626 void BT_finished()
nikitateggi 31:0f67acfc6236 627 {
nikitateggi 31:0f67acfc6236 628 backlight = 0 ;
nikitateggi 31:0f67acfc6236 629 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 630 TFT.background(White) ;
nikitateggi 31:0f67acfc6236 631 TFT.foreground(Blue) ;
nikitateggi 31:0f67acfc6236 632 TFT.fillrect(5,90,230,300,White);
nikitateggi 31:0f67acfc6236 633 TFT.locate(20,140) ;
nikitateggi 31:0f67acfc6236 634 TFT.printf("Files Tranfer") ;
nikitateggi 31:0f67acfc6236 635 TFT.locate(40,170) ;
nikitateggi 31:0f67acfc6236 636 TFT.printf("Completed") ;
nikitateggi 31:0f67acfc6236 637 //TFT.locate(45,160) ;
nikitateggi 31:0f67acfc6236 638 // TFT.printf("") ;
nikitateggi 31:0f67acfc6236 639 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 640 backlight = 1 ;
nikitateggi 31:0f67acfc6236 641 }
nikitateggi 31:0f67acfc6236 642
nikitateggi 31:0f67acfc6236 643
nikitateggi 31:0f67acfc6236 644 void screen_BT_return() // BT main screen
nikitateggi 31:0f67acfc6236 645 {
nikitateggi 31:0f67acfc6236 646 backlight = 0 ;
nikitateggi 31:0f67acfc6236 647 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 648 TFT.background(Green) ;
nikitateggi 31:0f67acfc6236 649 TFT.foreground(Black) ;
nikitateggi 31:0f67acfc6236 650 TFT.fillrect(5,90,230,300,White);
nikitateggi 31:0f67acfc6236 651 TFT.fillrect( 60,230,180,300,Green);
nikitateggi 31:0f67acfc6236 652 TFT.locate(80,250) ;
nikitateggi 31:0f67acfc6236 653 TFT.printf("MAIN") ;
nikitateggi 31:0f67acfc6236 654 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 655 backlight = 1 ;
nikitateggi 31:0f67acfc6236 656
nikitateggi 31:0f67acfc6236 657 }
nikitateggi 31:0f67acfc6236 658
nikitateggi 31:0f67acfc6236 659
nikitateggi 31:0f67acfc6236 660 void screen_patient_info(uint32_t current_test_pid,uint32_t bt_file_sent_pid)
nikitateggi 31:0f67acfc6236 661 {
nikitateggi 31:0f67acfc6236 662 char buf[10];
nikitateggi 31:0f67acfc6236 663 sprintf (buf, "current pid %d",current_test_pid);
nikitateggi 31:0f67acfc6236 664 backlight = 0 ;
nikitateggi 31:0f67acfc6236 665 TFT.BusEnable(true) ;
nikitateggi 31:0f67acfc6236 666 TFT.background(White);
nikitateggi 31:0f67acfc6236 667 TFT.foreground(Blue);
nikitateggi 31:0f67acfc6236 668 TFT.fillrect(5,90,230,300,White);
nikitateggi 31:0f67acfc6236 669 TFT.locate(20,140) ;
nikitateggi 31:0f67acfc6236 670 TFT.printf(buf) ;
nikitateggi 31:0f67acfc6236 671 sprintf (buf, "Bt pid %d",bt_file_sent_pid);
nikitateggi 31:0f67acfc6236 672 TFT.locate(20,170) ;
nikitateggi 31:0f67acfc6236 673 TFT.printf(buf) ;
nikitateggi 31:0f67acfc6236 674 TFT.background(Green) ;
nikitateggi 31:0f67acfc6236 675 TFT.foreground(Black) ;
nikitateggi 31:0f67acfc6236 676 TFT.fillrect( 60,230,180,300,Green);
nikitateggi 31:0f67acfc6236 677 TFT.locate(80,250) ;
nikitateggi 31:0f67acfc6236 678 TFT.printf("MAIN") ;
nikitateggi 31:0f67acfc6236 679 TFT.BusEnable(false) ;
nikitateggi 31:0f67acfc6236 680 backlight = 1 ;
nikitateggi 31:0f67acfc6236 681
nikitateggi 31:0f67acfc6236 682 }