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