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@37:92fcbf22bf91, 2017-07-29 (annotated)
- Committer:
- avp2417
- Date:
- Sat Jul 29 12:12:28 2017 +0000
- Revision:
- 37:92fcbf22bf91
- Parent:
- 35:43133f017ed4
- Child:
- 38:7238f3531ce9
Modification carried out by Nikita related to display screen timeout + Battery monitoring.
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 | 3:9a06c2bed650 | 5 | //#include "main.h" |
nikitateggi | 29:7edc76b15e3d | 6 | #include "ILI9341.h" |
nikitateggi | 29:7edc76b15e3d | 7 | //#include <ILI932x.h> |
nikitateggi | 7:11f926351d8f | 8 | #include "Arial12x12.h" |
nikitateggi | 7:11f926351d8f | 9 | #include "Arial24x23.h" |
nikitateggi | 7:11f926351d8f | 10 | //#include "Terminal6x8.h" |
nikitateggi | 7:11f926351d8f | 11 | //#include "Arial43x48_numb.h" |
nikitateggi | 0:c47fb0c1bbf6 | 12 | |
nikitateggi | 0:c47fb0c1bbf6 | 13 | |
nikitateggi | 7:11f926351d8f | 14 | //BusOut dataBus( PTC12, PTC13, PTB10, PTC9, PTD4, PTD5, PTD6, PTD7 ); // 16 pins//POC DISPALY 240*320 pixels |
nikitateggi | 7:11f926351d8f | 15 | //ILI9325_LCD lcd( PTC5, PTB9, PTC0, PTB0, &dataBus, NC, PTE31); |
nikitateggi | 0:c47fb0c1bbf6 | 16 | |
nikitateggi | 29:7edc76b15e3d | 17 | /*PinName buspins[8]={PTC12, PTC13, PTB10, PTC9, PTD4, PTD5, PTD6, PTD7 }; |
nikitateggi | 21:7ef1b0b40841 | 18 | ILI932x TFT(BUS_8, buspins, PTC5, PTB9, PTC0, PTB0,PTE31,"SPFD5408_2.4") ; |
nikitateggi | 29:7edc76b15e3d | 19 | DigitalOut backlight(PTC9) ;*/ |
nikitateggi | 29:7edc76b15e3d | 20 | |
nikitateggi | 29:7edc76b15e3d | 21 | PinName buspins[8]={PTD2, PTC13, PTB10, PTC9, PTD4, PTD5, PTD6, PTD7 }; //new_display ili9341 |
nikitateggi | 29:7edc76b15e3d | 22 | ILI9341 TFT(BUS_8, buspins, PTB0, PTB9, PTC0, PTB8,PTE31,"SPFD5408_2.4") ; |
nikitateggi | 7:11f926351d8f | 23 | DigitalOut backlight(PTC9) ; |
nikitateggi | 0:c47fb0c1bbf6 | 24 | |
nikitateggi | 1:8316c23ec6b9 | 25 | void init_screen() // initializing the screen |
nikitateggi | 1:8316c23ec6b9 | 26 | { |
nikitateggi | 7:11f926351d8f | 27 | //Configure the display driver |
nikitateggi | 7:11f926351d8f | 28 | TFT.FastWindow(true) ; |
nikitateggi | 7:11f926351d8f | 29 | TFT.background(Black); |
nikitateggi | 7:11f926351d8f | 30 | TFT.foreground(White); |
nikitateggi | 7:11f926351d8f | 31 | wait(0.01) ; |
nikitateggi | 7:11f926351d8f | 32 | TFT.cls(); |
nikitateggi | 1:8316c23ec6b9 | 33 | } |
nikitateggi | 0:c47fb0c1bbf6 | 34 | |
nikitateggi | 4:6bd81bb1790d | 35 | void screen_main() //main screen |
nikitateggi | 0:c47fb0c1bbf6 | 36 | { |
nikitateggi | 7:11f926351d8f | 37 | char buff1[32]; |
nikitateggi | 7:11f926351d8f | 38 | time_t epoch_time; |
nikitateggi | 7:11f926351d8f | 39 | epoch_time=rtc_read(); // read the time from rtc module |
nikitateggi | 7:11f926351d8f | 40 | strftime(buff1, 32, "%d-%m-%Y %H:%M",localtime(&epoch_time)); |
nikitateggi | 7:11f926351d8f | 41 | backlight = 0 ; |
nikitateggi | 7:11f926351d8f | 42 | TFT.BusEnable(true) ; |
nikitateggi | 7:11f926351d8f | 43 | TFT.background(White) ; |
nikitateggi | 20:7c64e6ecad76 | 44 | TFT.cls() ; |
nikitateggi | 20:7c64e6ecad76 | 45 | wait(0.1) ; |
nikitateggi | 7:11f926351d8f | 46 | TFT.set_font((unsigned char*) Arial12x12); |
nikitateggi | 7:11f926351d8f | 47 | TFT.foreground(Red); |
nikitateggi | 7:11f926351d8f | 48 | TFT.locate(20,100) ; |
nikitateggi | 20:7c64e6ecad76 | 49 | TFT.printf(buff1); |
nikitateggi | 20:7c64e6ecad76 | 50 | TFT.set_font((unsigned char*) Arial24x23); |
nikitateggi | 20:7c64e6ecad76 | 51 | TFT.foreground(Black); |
nikitateggi | 20:7c64e6ecad76 | 52 | TFT.locate(35,20) ; |
nikitateggi | 7:11f926351d8f | 53 | TFT.printf("SENSESEMI") ; |
nikitateggi | 7:11f926351d8f | 54 | TFT.locate(45,60) ; |
nikitateggi | 20:7c64e6ecad76 | 55 | TFT.printf("Sense POC") ; |
nikitateggi | 20:7c64e6ecad76 | 56 | TFT.background(Olive) ; |
nikitateggi | 20:7c64e6ecad76 | 57 | TFT.fillrect( 60,130,180,200,Olive); |
nikitateggi | 20:7c64e6ecad76 | 58 | TFT.locate(100,140) ; |
nikitateggi | 7:11f926351d8f | 59 | TFT.printf("SYS") ; |
nikitateggi | 20:7c64e6ecad76 | 60 | TFT.locate(65,170) ; |
nikitateggi | 7:11f926351d8f | 61 | TFT.printf("CONFIG") ; |
nikitateggi | 20:7c64e6ecad76 | 62 | TFT.fillrect( 60,230,180,300,Olive); |
avp2417 | 35:43133f017ed4 | 63 | TFT.locate(88,252) ; //y :changed from 250 to 252 //x: changed from 90 to 88 //rashmi 22/7/17 //rashmi 22/7/17 |
nikitateggi | 20:7c64e6ecad76 | 64 | TFT.printf("TEST") ; |
nikitateggi | 7:11f926351d8f | 65 | TFT.BusEnable(false) ; |
nikitateggi | 20:7c64e6ecad76 | 66 | backlight = 1 ; |
nikitateggi | 3:9a06c2bed650 | 67 | |
nikitateggi | 3:9a06c2bed650 | 68 | } |
nikitateggi | 1:8316c23ec6b9 | 69 | |
nikitateggi | 4:6bd81bb1790d | 70 | |
nikitateggi | 4:6bd81bb1790d | 71 | |
nikitateggi | 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); |
avp2417 | 35:43133f017ed4 | 118 | TFT.locate(38,160) ; //changed from 30 to 38 //rashmi 24/7/17 //changed from 40 to 30 //rashmi 22/7/17 |
avp2417 | 35:43133f017ed4 | 119 | TFT.printf("BT") ; ////changed from BLE to BT //rashmi 24/7/17 |
nikitateggi | 20:7c64e6ecad76 | 120 | TFT.fillrect( 130,130,220,200,GreenYellow); |
avp2417 | 35:43133f017ed4 | 121 | TFT.locate(145,160) ; //changed from 135 to 145 //rashmi 22/7/17 |
avp2417 | 35:43133f017ed4 | 122 | TFT.printf("DEL") ; //changed from ERASE to DEL //rashmi 22/7/17 |
nikitateggi | 20:7c64e6ecad76 | 123 | TFT.fillrect( 10,215,100,285,GreenYellow); |
avp2417 | 35:43133f017ed4 | 124 | TFT.locate(22,245) ; //changed from 26 to 22 //rashmi 24/7/17 //changed from 30 to 26 //rashmi 22/7/17 |
avp2417 | 35:43133f017ed4 | 125 | TFT.printf("P-Inf") ; |
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 |
avp2417 | 35:43133f017ed4 | 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) ; |
avp2417 | 35:43133f017ed4 | 151 | backlight = 1 ; |
avp2417 | 35:43133f017ed4 | 152 | } |
nikitateggi | 1:8316c23ec6b9 | 153 | |
nikitateggi | 1:8316c23ec6b9 | 154 | |
nikitateggi | 0:c47fb0c1bbf6 | 155 | |
nikitateggi | 22:ffa88619551d | 156 | void screen_ecg_2(uint16_t heart_rate) // ECG screen 2 |
nikitateggi | 1:8316c23ec6b9 | 157 | { |
nikitateggi | 20:7c64e6ecad76 | 158 | char buf[5]; |
nikitateggi | 20:7c64e6ecad76 | 159 | backlight = 0 ; |
nikitateggi | 20:7c64e6ecad76 | 160 | TFT.BusEnable(true) ; |
nikitateggi | 20:7c64e6ecad76 | 161 | TFT.background(White) ; |
nikitateggi | 20:7c64e6ecad76 | 162 | TFT.foreground(Green) ; |
nikitateggi | 22:ffa88619551d | 163 | sprintf (buf, "%d bpm",heart_rate); |
nikitateggi | 20:7c64e6ecad76 | 164 | TFT.fillrect(5,90,230,150,White); |
nikitateggi | 20:7c64e6ecad76 | 165 | TFT.locate(3,100) ; |
nikitateggi | 20:7c64e6ecad76 | 166 | TFT.printf(" ECG Tst Done ") ; |
nikitateggi | 20:7c64e6ecad76 | 167 | TFT.locate(3,150) ; |
nikitateggi | 20:7c64e6ecad76 | 168 | TFT.printf(" HeartRate ") ; |
nikitateggi | 20:7c64e6ecad76 | 169 | TFT.locate(50,180); // changed from 30 |
nikitateggi | 20:7c64e6ecad76 | 170 | TFT.printf(buf) ; |
nikitateggi | 20:7c64e6ecad76 | 171 | TFT.BusEnable(false) ; |
nikitateggi | 20:7c64e6ecad76 | 172 | backlight = 1 ; |
nikitateggi | 20:7c64e6ecad76 | 173 | } |
nikitateggi | 20:7c64e6ecad76 | 174 | |
nikitateggi | 20:7c64e6ecad76 | 175 | void screen_ecg_lead() // ECG screen for displaying no lead proper lead contact |
nikitateggi | 20:7c64e6ecad76 | 176 | { |
nikitateggi | 20:7c64e6ecad76 | 177 | backlight = 0 ; |
nikitateggi | 20:7c64e6ecad76 | 178 | TFT.BusEnable(true) ; |
nikitateggi | 20:7c64e6ecad76 | 179 | TFT.background(White) ; |
nikitateggi | 20:7c64e6ecad76 | 180 | TFT.foreground(Red) ; |
nikitateggi | 20:7c64e6ecad76 | 181 | TFT.fillrect(5,90,230,150,White); |
nikitateggi | 20:7c64e6ecad76 | 182 | TFT.locate(50,100) ; |
nikitateggi | 20:7c64e6ecad76 | 183 | TFT.printf("Re-check") ; |
nikitateggi | 20:7c64e6ecad76 | 184 | TFT.locate(3,130) ; |
nikitateggi | 20:7c64e6ecad76 | 185 | TFT.printf("Lead Connection") ; |
nikitateggi | 20:7c64e6ecad76 | 186 | TFT.BusEnable(false) ; |
nikitateggi | 20:7c64e6ecad76 | 187 | backlight = 1 ; |
nikitateggi | 20:7c64e6ecad76 | 188 | } |
nikitateggi | 20:7c64e6ecad76 | 189 | |
nikitateggi | 20:7c64e6ecad76 | 190 | |
nikitateggi | 20:7c64e6ecad76 | 191 | void screen_ecg_lead_bp_fingerdetect() // ECG screen for displaying no lead proper lead contact |
nikitateggi | 20:7c64e6ecad76 | 192 | { |
nikitateggi | 20:7c64e6ecad76 | 193 | backlight = 0 ; |
nikitateggi | 20:7c64e6ecad76 | 194 | TFT.BusEnable(true) ; |
nikitateggi | 20:7c64e6ecad76 | 195 | TFT.background(White) ; |
nikitateggi | 20:7c64e6ecad76 | 196 | TFT.foreground(Red) ; |
nikitateggi | 20:7c64e6ecad76 | 197 | TFT.fillrect(5,90,230,150,White); |
nikitateggi | 20:7c64e6ecad76 | 198 | TFT.locate(20,100) ; |
nikitateggi | 20:7c64e6ecad76 | 199 | TFT.printf("Re-check Leads") ; |
nikitateggi | 20:7c64e6ecad76 | 200 | TFT.locate(50,130) ; |
nikitateggi | 20:7c64e6ecad76 | 201 | TFT.printf("& finger ") ; |
nikitateggi | 20:7c64e6ecad76 | 202 | TFT.locate(45,160) ; |
nikitateggi | 20:7c64e6ecad76 | 203 | TFT.printf("placement") ; |
nikitateggi | 20:7c64e6ecad76 | 204 | TFT.BusEnable(false) ; |
nikitateggi | 20:7c64e6ecad76 | 205 | backlight = 1 ; |
nikitateggi | 20:7c64e6ecad76 | 206 | } |
nikitateggi | 20:7c64e6ecad76 | 207 | |
nikitateggi | 20:7c64e6ecad76 | 208 | void screen_ecg_bp() // added screen dispaly text //14/06 |
nikitateggi | 20:7c64e6ecad76 | 209 | { backlight = 0 ; |
nikitateggi | 20:7c64e6ecad76 | 210 | TFT.BusEnable(true) ; |
nikitateggi | 20:7c64e6ecad76 | 211 | TFT.background(Green) ; |
nikitateggi | 20:7c64e6ecad76 | 212 | TFT.fillrect(10,215,230,290,White); |
nikitateggi | 20:7c64e6ecad76 | 213 | //TFT.fillrect(60,230,180,300,Green); |
nikitateggi | 20:7c64e6ecad76 | 214 | //TFT.locate(100,250) ; |
nikitateggi | 20:7c64e6ecad76 | 215 | TFT.foreground(Black) ; |
nikitateggi | 20:7c64e6ecad76 | 216 | // TFT.printf("RET") ; |
nikitateggi | 20:7c64e6ecad76 | 217 | TFT.fillrect( 10,215,100,285,Green); |
avp2417 | 35:43133f017ed4 | 218 | TFT.locate(20,245) ; //changed from 30 to 20 //rashmi 22/7/17 |
nikitateggi | 20:7c64e6ecad76 | 219 | TFT.printf("MAIN") ; |
nikitateggi | 20:7c64e6ecad76 | 220 | TFT.fillrect(130,215,220,285,Green); |
nikitateggi | 20:7c64e6ecad76 | 221 | TFT.locate(155,235) ; // changed // points // 13/06 |
nikitateggi | 20:7c64e6ecad76 | 222 | TFT.printf("RE-") ; |
avp2417 | 35:43133f017ed4 | 223 | TFT.locate(140,255) ; //chnaged from 145 to 140 //rashmi 22/7/17 |
nikitateggi | 20:7c64e6ecad76 | 224 | TFT.printf("TEST") ; |
nikitateggi | 20:7c64e6ecad76 | 225 | TFT.BusEnable(false) ; |
nikitateggi | 20:7c64e6ecad76 | 226 | backlight = 1 ; |
nikitateggi | 3:9a06c2bed650 | 227 | |
nikitateggi | 1:8316c23ec6b9 | 228 | } |
nikitateggi | 1:8316c23ec6b9 | 229 | |
nikitateggi | 1:8316c23ec6b9 | 230 | |
nikitateggi | 0:c47fb0c1bbf6 | 231 | |
nikitateggi | 4:6bd81bb1790d | 232 | void screen_bp() // BP main screen |
nikitateggi | 0:c47fb0c1bbf6 | 233 | { |
nikitateggi | 7:11f926351d8f | 234 | backlight = 0 ; |
nikitateggi | 7:11f926351d8f | 235 | TFT.BusEnable(true) ; |
nikitateggi | 7:11f926351d8f | 236 | TFT.background(Green) ; |
nikitateggi | 7:11f926351d8f | 237 | TFT.foreground(Black) ; |
nikitateggi | 7:11f926351d8f | 238 | TFT.fillrect(10,130,100,200,White); |
nikitateggi | 7:11f926351d8f | 239 | TFT.fillrect(130,130,220,200,White); |
nikitateggi | 7:11f926351d8f | 240 | TFT.fillrect(10,215,100,285,White); |
nikitateggi | 7:11f926351d8f | 241 | TFT.fillrect(130,215,220,285,White); |
nikitateggi | 7:11f926351d8f | 242 | TFT.fillrect( 60,130,180,200,Green); |
nikitateggi | 7:11f926351d8f | 243 | TFT.locate(80,150) ; |
nikitateggi | 7:11f926351d8f | 244 | TFT.printf("START") ; |
nikitateggi | 7:11f926351d8f | 245 | TFT.fillrect( 60,230,180,300,Green); |
avp2417 | 35:43133f017ed4 | 246 | TFT.locate(90,250) ; //changed from 100 to 90 //rashmi 22/7/17 |
nikitateggi | 20:7c64e6ecad76 | 247 | TFT.printf("MAIN") ; |
nikitateggi | 7:11f926351d8f | 248 | TFT.BusEnable(false) ; |
nikitateggi | 20:7c64e6ecad76 | 249 | backlight = 1 ; |
nikitateggi | 3:9a06c2bed650 | 250 | |
nikitateggi | 3:9a06c2bed650 | 251 | } |
nikitateggi | 3:9a06c2bed650 | 252 | |
nikitateggi | 4:6bd81bb1790d | 253 | |
nikitateggi | 4:6bd81bb1790d | 254 | void screen_bp1(float SBP, float DBP) // BP screen 2 |
nikitateggi | 3:9a06c2bed650 | 255 | { |
nikitateggi | 7:11f926351d8f | 256 | backlight = 0 ; |
nikitateggi | 7:11f926351d8f | 257 | TFT.BusEnable(true) ; |
nikitateggi | 20:7c64e6ecad76 | 258 | TFT.background(White) ; |
nikitateggi | 20:7c64e6ecad76 | 259 | TFT.foreground(Green) ; |
nikitateggi | 20:7c64e6ecad76 | 260 | char buf[10]; |
nikitateggi | 20:7c64e6ecad76 | 261 | TFT.fillrect(3,130,200,200,White); |
nikitateggi | 20:7c64e6ecad76 | 262 | TFT.fillrect(60,230,180,300,White); |
nikitateggi | 20:7c64e6ecad76 | 263 | TFT.locate(3,100) ; |
nikitateggi | 20:7c64e6ecad76 | 264 | TFT.printf(" BP Tst Done ") ; |
nikitateggi | 20:7c64e6ecad76 | 265 | sprintf (buf, "SBP: %.0f ",SBP); // changed to display 2 digits after decimal point, 2May'17 Changed to Integer |
nikitateggi | 20:7c64e6ecad76 | 266 | TFT.locate(5,140) ; // changed 100 to 150 |
nikitateggi | 7:11f926351d8f | 267 | TFT.printf(buf) ; |
nikitateggi | 20:7c64e6ecad76 | 268 | sprintf (buf, "DBP: %.0f",DBP); // changed to display 2 digits after decimal point, 2May'17, Changed to integer |
nikitateggi | 20:7c64e6ecad76 | 269 | TFT.locate(5,170) ; // CHANGED from 150 to 170 |
nikitateggi | 20:7c64e6ecad76 | 270 | TFT.printf(buf) ; |
nikitateggi | 20:7c64e6ecad76 | 271 | //TFT.fillrect(60,230,180,300,Green); |
nikitateggi | 20:7c64e6ecad76 | 272 | //TFT.locate(85,250) ; |
nikitateggi | 20:7c64e6ecad76 | 273 | /* TFT.foreground(Black) ; // commented //16/06 |
nikitateggi | 20:7c64e6ecad76 | 274 | TFT.background(Green) ; |
nikitateggi | 20:7c64e6ecad76 | 275 | //TFT.printf("RET") ; |
nikitateggi | 20:7c64e6ecad76 | 276 | TFT.fillrect( 10,215,100,285,Green); |
nikitateggi | 20:7c64e6ecad76 | 277 | TFT.locate(30,245) ; |
nikitateggi | 20:7c64e6ecad76 | 278 | TFT.printf("RET") ; |
nikitateggi | 20:7c64e6ecad76 | 279 | TFT.fillrect(130,215,220,285,Green); |
nikitateggi | 20:7c64e6ecad76 | 280 | TFT.locate(155,235) ; // changed // points // 13/06 |
nikitateggi | 20:7c64e6ecad76 | 281 | TFT.printf("RE-") ; |
nikitateggi | 20:7c64e6ecad76 | 282 | TFT.locate(145,255) ; |
nikitateggi | 20:7c64e6ecad76 | 283 | TFT.printf("TEST") ; */ |
nikitateggi | 20:7c64e6ecad76 | 284 | TFT.BusEnable(false) ; |
nikitateggi | 20:7c64e6ecad76 | 285 | backlight = 1 ; |
nikitateggi | 3:9a06c2bed650 | 286 | } |
nikitateggi | 3:9a06c2bed650 | 287 | |
nikitateggi | 3:9a06c2bed650 | 288 | |
nikitateggi | 3:9a06c2bed650 | 289 | |
nikitateggi | 0:c47fb0c1bbf6 | 290 | |
nikitateggi | 0:c47fb0c1bbf6 | 291 | |
nikitateggi | 1:8316c23ec6b9 | 292 | void screen_glc() // glc main screen |
nikitateggi | 0:c47fb0c1bbf6 | 293 | { |
nikitateggi | 3:9a06c2bed650 | 294 | |
nikitateggi | 20:7c64e6ecad76 | 295 | backlight = 0 ; |
nikitateggi | 7:11f926351d8f | 296 | TFT.BusEnable(true) ; |
nikitateggi | 20:7c64e6ecad76 | 297 | TFT.background(Green) ; |
nikitateggi | 20:7c64e6ecad76 | 298 | TFT.foreground(Black) ; |
nikitateggi | 20:7c64e6ecad76 | 299 | TFT.fillrect(10,130,100,200,White); |
nikitateggi | 20:7c64e6ecad76 | 300 | TFT.fillrect(130,130,220,200,White); |
nikitateggi | 20:7c64e6ecad76 | 301 | TFT.fillrect(10,215,100,285,White); |
nikitateggi | 20:7c64e6ecad76 | 302 | TFT.fillrect(130,215,220,285,White); |
nikitateggi | 20:7c64e6ecad76 | 303 | // TFT.fillrect( 60,130,180,200,Green); |
nikitateggi | 20:7c64e6ecad76 | 304 | // TFT.locate(80,150) ; |
nikitateggi | 20:7c64e6ecad76 | 305 | // TFT.printf("START") ; |
nikitateggi | 20:7c64e6ecad76 | 306 | TFT.fillrect( 10,130,100,200,Green); |
nikitateggi | 20:7c64e6ecad76 | 307 | TFT.locate(30,160) ; // changed to 30 from 40 |
nikitateggi | 20:7c64e6ecad76 | 308 | TFT.printf("FBS") ; |
nikitateggi | 20:7c64e6ecad76 | 309 | TFT.fillrect( 130,130,220,200,Green); |
nikitateggi | 20:7c64e6ecad76 | 310 | TFT.locate(155,160) ; |
nikitateggi | 20:7c64e6ecad76 | 311 | TFT.printf("PP") ; |
nikitateggi | 20:7c64e6ecad76 | 312 | TFT.fillrect( 10,215,100,285,Green); |
avp2417 | 35:43133f017ed4 | 313 | TFT.locate(23,245) ; //changed from 20 to 23 //rashmi 22/7/17 |
nikitateggi | 20:7c64e6ecad76 | 314 | TFT.printf("RAN") ; |
nikitateggi | 20:7c64e6ecad76 | 315 | TFT.fillrect(130,215,220,285,Green); |
avp2417 | 35:43133f017ed4 | 316 | TFT.locate(145,245); //changed from 150 to 145 //rashmi 22/7/17 |
nikitateggi | 20:7c64e6ecad76 | 317 | TFT.printf("MAIN") ; |
nikitateggi | 20:7c64e6ecad76 | 318 | // TFT.fillrect( 60,230,180,300,Green); |
nikitateggi | 20:7c64e6ecad76 | 319 | // TFT.locate(100,250) ; |
nikitateggi | 20:7c64e6ecad76 | 320 | // TFT.printf("RET") ; |
nikitateggi | 7:11f926351d8f | 321 | TFT.BusEnable(false) ; |
nikitateggi | 20:7c64e6ecad76 | 322 | backlight = 1 ; |
nikitateggi | 3:9a06c2bed650 | 323 | |
nikitateggi | 0:c47fb0c1bbf6 | 324 | } |
nikitateggi | 0:c47fb0c1bbf6 | 325 | |
nikitateggi | 4:6bd81bb1790d | 326 | |
nikitateggi | 4:6bd81bb1790d | 327 | void screen_bp2() //BP screen 3 |
nikitateggi | 3:9a06c2bed650 | 328 | { |
nikitateggi | 3:9a06c2bed650 | 329 | |
nikitateggi | 7:11f926351d8f | 330 | /* lcd.FillRoundRect(3,130,200,200,COLOR_BLACK); |
nikitateggi | 3:9a06c2bed650 | 331 | lcd.FillRoundRect(60,230,180,300,COLOR_BLACK); |
nikitateggi | 7:11f926351d8f | 332 | lcd.FillRect(5,215,230,290,COLOR_BLACK);*/ |
nikitateggi | 3:9a06c2bed650 | 333 | |
nikitateggi | 3:9a06c2bed650 | 334 | } |
nikitateggi | 1:8316c23ec6b9 | 335 | |
nikitateggi | 1:8316c23ec6b9 | 336 | |
nikitateggi | 4:6bd81bb1790d | 337 | void ecg_countdown() // ECG measurement countdown |
nikitateggi | 1:8316c23ec6b9 | 338 | { |
nikitateggi | 20:7c64e6ecad76 | 339 | backlight = 0 ; |
nikitateggi | 7:11f926351d8f | 340 | TFT.BusEnable(true) ; |
nikitateggi | 20:7c64e6ecad76 | 341 | TFT.background(White) ; |
nikitateggi | 20:7c64e6ecad76 | 342 | TFT.foreground(Green) ; |
nikitateggi | 20:7c64e6ecad76 | 343 | char tim1[5]; |
nikitateggi | 20:7c64e6ecad76 | 344 | TFT.fillrect(3,130,200,200,White); |
nikitateggi | 20:7c64e6ecad76 | 345 | TFT.fillrect(60,230,180,300,White); |
nikitateggi | 20:7c64e6ecad76 | 346 | TFT.fillrect(5,215,230,290,White); |
nikitateggi | 20:7c64e6ecad76 | 347 | TFT.locate(25,100) ; |
nikitateggi | 20:7c64e6ecad76 | 348 | TFT.printf("ECG starts in") ; |
nikitateggi | 20:7c64e6ecad76 | 349 | for(int i=5;i>=0;i--) |
nikitateggi | 20:7c64e6ecad76 | 350 | { |
nikitateggi | 1:8316c23ec6b9 | 351 | wait(1); |
nikitateggi | 1:8316c23ec6b9 | 352 | sprintf (tim1, "%d",i); |
nikitateggi | 7:11f926351d8f | 353 | TFT.locate(120,120) ; |
nikitateggi | 20:7c64e6ecad76 | 354 | TFT.printf(tim1) ; |
nikitateggi | 20:7c64e6ecad76 | 355 | } |
nikitateggi | 7:11f926351d8f | 356 | TFT.BusEnable(false) ; |
nikitateggi | 7:11f926351d8f | 357 | backlight = 1 ; |
nikitateggi | 7:11f926351d8f | 358 | |
nikitateggi | 3:9a06c2bed650 | 359 | |
nikitateggi | 1:8316c23ec6b9 | 360 | } |
nikitateggi | 1:8316c23ec6b9 | 361 | |
suhasini | 6:5e33a0f01476 | 362 | void bp_countdown() // ECG measurement countdown |
suhasini | 6:5e33a0f01476 | 363 | { |
nikitateggi | 20:7c64e6ecad76 | 364 | backlight = 0 ; |
nikitateggi | 7:11f926351d8f | 365 | TFT.BusEnable(true) ; |
nikitateggi | 20:7c64e6ecad76 | 366 | TFT.background(White) ; |
nikitateggi | 20:7c64e6ecad76 | 367 | TFT.foreground(Green) ; |
nikitateggi | 20:7c64e6ecad76 | 368 | char tim1[5]; |
nikitateggi | 20:7c64e6ecad76 | 369 | TFT.fillrect(3,130,200,200,White); |
nikitateggi | 20:7c64e6ecad76 | 370 | TFT.fillrect(60,230,180,300,White); |
nikitateggi | 20:7c64e6ecad76 | 371 | TFT.fillrect(1,80,240,290,White); //changed the points// 13/06 |
nikitateggi | 20:7c64e6ecad76 | 372 | TFT.locate(25,100) ; |
nikitateggi | 20:7c64e6ecad76 | 373 | TFT.printf("BP starts in") ; |
nikitateggi | 20:7c64e6ecad76 | 374 | for(int i=5;i>=0;i--) |
suhasini | 6:5e33a0f01476 | 375 | { |
suhasini | 6:5e33a0f01476 | 376 | wait(1); |
suhasini | 6:5e33a0f01476 | 377 | sprintf (tim1, "%d",i); |
nikitateggi | 7:11f926351d8f | 378 | TFT.locate(120,120) ; |
nikitateggi | 20:7c64e6ecad76 | 379 | TFT.printf(tim1) ; |
suhasini | 6:5e33a0f01476 | 380 | } |
nikitateggi | 7:11f926351d8f | 381 | TFT.BusEnable(false) ; |
nikitateggi | 7:11f926351d8f | 382 | backlight = 1 ; |
nikitateggi | 7:11f926351d8f | 383 | } |
nikitateggi | 1:8316c23ec6b9 | 384 | |
nikitateggi | 4:6bd81bb1790d | 385 | void screen_again() // screen to press 'yes' or 'no' to repeat the test |
nikitateggi | 7:11f926351d8f | 386 | { |
nikitateggi | 20:7c64e6ecad76 | 387 | backlight = 0 ; |
nikitateggi | 20:7c64e6ecad76 | 388 | TFT.BusEnable(true) ; |
nikitateggi | 20:7c64e6ecad76 | 389 | TFT.background(White) ; |
nikitateggi | 20:7c64e6ecad76 | 390 | TFT.foreground(Black) ; |
nikitateggi | 20:7c64e6ecad76 | 391 | TFT.fillrect(5,127,230,200,White); |
nikitateggi | 20:7c64e6ecad76 | 392 | TFT.locate(50,130) ; |
nikitateggi | 20:7c64e6ecad76 | 393 | TFT.printf("Take test") ; |
nikitateggi | 20:7c64e6ecad76 | 394 | TFT.locate(75,160) ; |
nikitateggi | 20:7c64e6ecad76 | 395 | TFT.printf("again?") ; |
nikitateggi | 20:7c64e6ecad76 | 396 | TFT.background(Orange) ; |
nikitateggi | 20:7c64e6ecad76 | 397 | TFT.locate(30,245) ; |
nikitateggi | 20:7c64e6ecad76 | 398 | TFT.printf("YES") ; |
nikitateggi | 20:7c64e6ecad76 | 399 | TFT.locate(135,245) ; |
nikitateggi | 20:7c64e6ecad76 | 400 | TFT.printf(" NO ") ; |
nikitateggi | 20:7c64e6ecad76 | 401 | backlight = 1 ; |
nikitateggi | 7:11f926351d8f | 402 | TFT.BusEnable(false) ; |
nikitateggi | 3:9a06c2bed650 | 403 | |
nikitateggi | 1:8316c23ec6b9 | 404 | } |
nikitateggi | 1:8316c23ec6b9 | 405 | |
nikitateggi | 1:8316c23ec6b9 | 406 | |
nikitateggi | 4:6bd81bb1790d | 407 | void screen_glc_2() // GLC screen 3 after test |
nikitateggi | 1:8316c23ec6b9 | 408 | { |
nikitateggi | 3:9a06c2bed650 | 409 | |
nikitateggi | 20:7c64e6ecad76 | 410 | backlight = 0 ; |
nikitateggi | 7:11f926351d8f | 411 | TFT.BusEnable(true) ; |
nikitateggi | 20:7c64e6ecad76 | 412 | TFT.background(White) ; |
nikitateggi | 20:7c64e6ecad76 | 413 | TFT.foreground(Black) ; |
nikitateggi | 32:76892fdf5e4c | 414 | TFT.fillrect(10,215,230,290,White); |
nikitateggi | 20:7c64e6ecad76 | 415 | //TFT.fillrect(60,230,180,300,Green); |
nikitateggi | 20:7c64e6ecad76 | 416 | //TFT.locate(85,250) ; |
nikitateggi | 20:7c64e6ecad76 | 417 | TFT.background(Green); |
nikitateggi | 20:7c64e6ecad76 | 418 | //TFT.printf("RET") ; |
nikitateggi | 20:7c64e6ecad76 | 419 | TFT.fillrect( 10,215,100,285,Green); |
avp2417 | 35:43133f017ed4 | 420 | TFT.locate(25,245) ; // changed from 30 to 25 //rashmi 22/7/17 |
nikitateggi | 20:7c64e6ecad76 | 421 | TFT.printf("MAIN") ; |
nikitateggi | 20:7c64e6ecad76 | 422 | TFT.fillrect(130,215,220,285,Green); |
nikitateggi | 20:7c64e6ecad76 | 423 | TFT.locate(155,235) ; // changed // points // 13/06 |
nikitateggi | 20:7c64e6ecad76 | 424 | TFT.printf("RE-") ; |
nikitateggi | 20:7c64e6ecad76 | 425 | TFT.locate(140,255) ; // changed from 145 to 140 |
nikitateggi | 20:7c64e6ecad76 | 426 | TFT.printf("TEST") ; |
nikitateggi | 20:7c64e6ecad76 | 427 | backlight = 1 ; |
nikitateggi | 20:7c64e6ecad76 | 428 | TFT.BusEnable(false) ; |
nikitateggi | 7:11f926351d8f | 429 | |
nikitateggi | 7:11f926351d8f | 430 | |
nikitateggi | 7:11f926351d8f | 431 | |
nikitateggi | 1:8316c23ec6b9 | 432 | } |
nikitateggi | 1:8316c23ec6b9 | 433 | |
nikitateggi | 4:6bd81bb1790d | 434 | |
nikitateggi | 4:6bd81bb1790d | 435 | void glc_1() // GLC screen |
nikitateggi | 7:11f926351d8f | 436 | { |
nikitateggi | 20:7c64e6ecad76 | 437 | backlight = 0 ; |
nikitateggi | 20:7c64e6ecad76 | 438 | TFT.BusEnable(true) ; |
nikitateggi | 20:7c64e6ecad76 | 439 | TFT.background(White) ; |
nikitateggi | 20:7c64e6ecad76 | 440 | TFT.foreground(Magenta ) ; |
nikitateggi | 20:7c64e6ecad76 | 441 | TFT.fillrect(3,130,200,200,White); |
nikitateggi | 20:7c64e6ecad76 | 442 | TFT.fillrect(60,230,180,300,White); |
nikitateggi | 20:7c64e6ecad76 | 443 | TFT.fillrect(5,215,230,290,White); |
nikitateggi | 20:7c64e6ecad76 | 444 | TFT.fillrect( 130,130,220,200,White); |
nikitateggi | 20:7c64e6ecad76 | 445 | TFT.locate(5,130) ; |
nikitateggi | 20:7c64e6ecad76 | 446 | TFT.printf("Blood Glucose") ; |
nikitateggi | 20:7c64e6ecad76 | 447 | TFT.locate(5,160) ; |
nikitateggi | 20:7c64e6ecad76 | 448 | TFT.printf("Insert strip") ; |
nikitateggi | 20:7c64e6ecad76 | 449 | TFT.BusEnable(false) ; |
nikitateggi | 20:7c64e6ecad76 | 450 | backlight = 1 ; |
nikitateggi | 7:11f926351d8f | 451 | |
nikitateggi | 7:11f926351d8f | 452 | |
nikitateggi | 7:11f926351d8f | 453 | |
nikitateggi | 1:8316c23ec6b9 | 454 | } |
nikitateggi | 1:8316c23ec6b9 | 455 | |
nikitateggi | 4:6bd81bb1790d | 456 | void glc_2() // GLC screen |
nikitateggi | 1:8316c23ec6b9 | 457 | { |
nikitateggi | 20:7c64e6ecad76 | 458 | backlight = 0 ; |
nikitateggi | 20:7c64e6ecad76 | 459 | TFT.BusEnable(true) ; |
nikitateggi | 20:7c64e6ecad76 | 460 | TFT.locate(5,160) ; |
nikitateggi | 20:7c64e6ecad76 | 461 | TFT.printf("Strip Detected") ; |
nikitateggi | 20:7c64e6ecad76 | 462 | TFT.locate(5,190) ; |
nikitateggi | 20:7c64e6ecad76 | 463 | TFT.printf("Insert Blood") ; |
nikitateggi | 20:7c64e6ecad76 | 464 | TFT.BusEnable(false) ; |
nikitateggi | 20:7c64e6ecad76 | 465 | backlight = 1 ; |
nikitateggi | 1:8316c23ec6b9 | 466 | } |
nikitateggi | 0:c47fb0c1bbf6 | 467 | |
nikitateggi | 4:6bd81bb1790d | 468 | |
nikitateggi | 4:6bd81bb1790d | 469 | void glc_3() // GLC screen |
nikitateggi | 1:8316c23ec6b9 | 470 | { |
nikitateggi | 20:7c64e6ecad76 | 471 | backlight = 0 ; |
nikitateggi | 20:7c64e6ecad76 | 472 | TFT.BusEnable(true) ; |
nikitateggi | 20:7c64e6ecad76 | 473 | TFT.locate(5,190) ; |
nikitateggi | 20:7c64e6ecad76 | 474 | TFT.printf("Blood Detected") ; |
nikitateggi | 20:7c64e6ecad76 | 475 | TFT.locate( 5,220) ; |
nikitateggi | 20:7c64e6ecad76 | 476 | TFT.printf("computing") ; |
nikitateggi | 20:7c64e6ecad76 | 477 | TFT.BusEnable(false) ; |
nikitateggi | 20:7c64e6ecad76 | 478 | backlight = 1 ; |
nikitateggi | 7:11f926351d8f | 479 | } |
nikitateggi | 1:8316c23ec6b9 | 480 | |
nikitateggi | 4:6bd81bb1790d | 481 | |
nidhinvarghese | 15:208b146151ba | 482 | void glc_4(uint16_t mgdl) // GLC screen to display blood glucose level on the LCD |
nikitateggi | 7:11f926351d8f | 483 | { |
nikitateggi | 20:7c64e6ecad76 | 484 | char buf[10]; |
nikitateggi | 20:7c64e6ecad76 | 485 | sprintf (buf, " BG %d mg/dl",mgdl); |
nikitateggi | 20:7c64e6ecad76 | 486 | backlight = 0 ; |
nikitateggi | 20:7c64e6ecad76 | 487 | TFT.BusEnable(true) ; |
nikitateggi | 20:7c64e6ecad76 | 488 | TFT.fillrect(5,127,230,320,White); |
nikitateggi | 20:7c64e6ecad76 | 489 | TFT.locate(3,100) ; |
nikitateggi | 20:7c64e6ecad76 | 490 | TFT.printf(" BG Tst Done ") ; |
nikitateggi | 20:7c64e6ecad76 | 491 | TFT.locate(5,130) ; |
nikitateggi | 7:11f926351d8f | 492 | TFT.printf(buf) ; |
nikitateggi | 20:7c64e6ecad76 | 493 | TFT.locate(5,160) ; |
nikitateggi | 20:7c64e6ecad76 | 494 | TFT.printf("(Range 70-120 mg/dl)") ; // added 16/06 |
nikitateggi | 20:7c64e6ecad76 | 495 | TFT.BusEnable(false) ; |
nikitateggi | 20:7c64e6ecad76 | 496 | backlight = 1 ; |
nikitateggi | 20:7c64e6ecad76 | 497 | } |
nikitateggi | 22:ffa88619551d | 498 | |
nikitateggi | 22:ffa88619551d | 499 | |
avp2417 | 37:92fcbf22bf91 | 500 | void battery_screen_nocharge() |
nikitateggi | 22:ffa88619551d | 501 | { |
avp2417 | 37:92fcbf22bf91 | 502 | |
avp2417 | 37:92fcbf22bf91 | 503 | |
avp2417 | 37:92fcbf22bf91 | 504 | backlight = 0 ; |
avp2417 | 37:92fcbf22bf91 | 505 | TFT.BusEnable(true) ; |
avp2417 | 37:92fcbf22bf91 | 506 | TFT.background(White) ; |
avp2417 | 37:92fcbf22bf91 | 507 | TFT.set_font((unsigned char*) Arial12x12); |
avp2417 | 37:92fcbf22bf91 | 508 | TFT.foreground(Red); |
avp2417 | 37:92fcbf22bf91 | 509 | TFT.locate(10,8) ; |
avp2417 | 37:92fcbf22bf91 | 510 | TFT.printf("No Charge") ; |
avp2417 | 37:92fcbf22bf91 | 511 | TFT.set_font((unsigned char*) Arial24x23); |
avp2417 | 37:92fcbf22bf91 | 512 | TFT.BusEnable(false) ; |
avp2417 | 37:92fcbf22bf91 | 513 | backlight = 1 ; |
avp2417 | 37:92fcbf22bf91 | 514 | |
avp2417 | 37:92fcbf22bf91 | 515 | |
avp2417 | 37:92fcbf22bf91 | 516 | } |
avp2417 | 37:92fcbf22bf91 | 517 | |
avp2417 | 37:92fcbf22bf91 | 518 | void battery_screen_charge() |
avp2417 | 37:92fcbf22bf91 | 519 | { |
nikitateggi | 22:ffa88619551d | 520 | backlight = 0 ; |
nikitateggi | 22:ffa88619551d | 521 | TFT.BusEnable(true) ; |
avp2417 | 37:92fcbf22bf91 | 522 | TFT.background(White) ; |
avp2417 | 37:92fcbf22bf91 | 523 | TFT.set_font((unsigned char*) Arial12x12); |
avp2417 | 37:92fcbf22bf91 | 524 | TFT.foreground(Green); |
avp2417 | 37:92fcbf22bf91 | 525 | TFT.locate(10,8) ; |
avp2417 | 37:92fcbf22bf91 | 526 | TFT.printf("Battery Charged") ; |
avp2417 | 37:92fcbf22bf91 | 527 | TFT.set_font((unsigned char*) Arial24x23); |
avp2417 | 37:92fcbf22bf91 | 528 | TFT.BusEnable(false) ; |
avp2417 | 37:92fcbf22bf91 | 529 | backlight = 1 ; |
avp2417 | 37:92fcbf22bf91 | 530 | |
avp2417 | 37:92fcbf22bf91 | 531 | } |
avp2417 | 37:92fcbf22bf91 | 532 | |
avp2417 | 37:92fcbf22bf91 | 533 | |
avp2417 | 37:92fcbf22bf91 | 534 | |
avp2417 | 37:92fcbf22bf91 | 535 | void battery_critically_low_charge() |
avp2417 | 37:92fcbf22bf91 | 536 | { |
avp2417 | 37:92fcbf22bf91 | 537 | backlight = 0 ; |
nikitateggi | 22:ffa88619551d | 538 | TFT.BusEnable(true) ; |
avp2417 | 37:92fcbf22bf91 | 539 | TFT.background(White) ; |
avp2417 | 37:92fcbf22bf91 | 540 | TFT.set_font((unsigned char*) Arial12x12); |
avp2417 | 37:92fcbf22bf91 | 541 | TFT.foreground(Green); |
avp2417 | 37:92fcbf22bf91 | 542 | TFT.locate(10,8) ; |
avp2417 | 37:92fcbf22bf91 | 543 | TFT.printf("Critically Low") ; |
avp2417 | 37:92fcbf22bf91 | 544 | TFT.set_font((unsigned char*) Arial24x23); |
avp2417 | 37:92fcbf22bf91 | 545 | TFT.BusEnable(false) ; |
avp2417 | 37:92fcbf22bf91 | 546 | backlight = 1 ; |
avp2417 | 37:92fcbf22bf91 | 547 | |
avp2417 | 37:92fcbf22bf91 | 548 | } |
avp2417 | 37:92fcbf22bf91 | 549 | |
avp2417 | 37:92fcbf22bf91 | 550 | void battery_low_charge() |
avp2417 | 37:92fcbf22bf91 | 551 | { |
avp2417 | 37:92fcbf22bf91 | 552 | backlight = 0 ; |
avp2417 | 37:92fcbf22bf91 | 553 | TFT.BusEnable(true) ; |
avp2417 | 37:92fcbf22bf91 | 554 | TFT.background(White) ; |
avp2417 | 37:92fcbf22bf91 | 555 | TFT.set_font((unsigned char*) Arial12x12); |
avp2417 | 37:92fcbf22bf91 | 556 | TFT.foreground(Green); |
avp2417 | 37:92fcbf22bf91 | 557 | TFT.locate(10,8) ; |
avp2417 | 37:92fcbf22bf91 | 558 | TFT.printf("Low Battery") ; |
avp2417 | 37:92fcbf22bf91 | 559 | TFT.set_font((unsigned char*) Arial24x23); |
avp2417 | 37:92fcbf22bf91 | 560 | TFT.BusEnable(false) ; |
avp2417 | 37:92fcbf22bf91 | 561 | backlight = 1 ; |
avp2417 | 37:92fcbf22bf91 | 562 | |
avp2417 | 37:92fcbf22bf91 | 563 | } |
avp2417 | 35:43133f017ed4 | 564 | |
avp2417 | 35:43133f017ed4 | 565 | void screen_ecg_error() |
nikitateggi | 31:0f67acfc6236 | 566 | { |
nikitateggi | 31:0f67acfc6236 | 567 | backlight = 0 ; |
nikitateggi | 31:0f67acfc6236 | 568 | TFT.BusEnable(true) ; |
nikitateggi | 31:0f67acfc6236 | 569 | TFT.background(White) ; |
nikitateggi | 31:0f67acfc6236 | 570 | TFT.foreground(Red) ; |
nikitateggi | 31:0f67acfc6236 | 571 | TFT.fillrect(5,90,230,150,White); |
nikitateggi | 31:0f67acfc6236 | 572 | TFT.locate(50,100) ; |
nikitateggi | 31:0f67acfc6236 | 573 | TFT.printf("ERROR!") ; |
nikitateggi | 31:0f67acfc6236 | 574 | TFT.locate(20,130) ; |
nikitateggi | 31:0f67acfc6236 | 575 | TFT.printf("Take ReTest") ; |
nikitateggi | 31:0f67acfc6236 | 576 | //TFT.locate(45,160) ; |
nikitateggi | 31:0f67acfc6236 | 577 | // TFT.printf("") ; |
nikitateggi | 31:0f67acfc6236 | 578 | TFT.BusEnable(false) ; |
nikitateggi | 31:0f67acfc6236 | 579 | backlight = 1 ; |
nikitateggi | 31:0f67acfc6236 | 580 | } |
nikitateggi | 31:0f67acfc6236 | 581 | |
nikitateggi | 31:0f67acfc6236 | 582 | void screen_bp_error() |
nikitateggi | 31:0f67acfc6236 | 583 | { |
nikitateggi | 31:0f67acfc6236 | 584 | backlight = 0 ; |
nikitateggi | 31:0f67acfc6236 | 585 | TFT.BusEnable(true) ; |
nikitateggi | 31:0f67acfc6236 | 586 | TFT.background(White) ; |
nikitateggi | 31:0f67acfc6236 | 587 | TFT.foreground(Red) ; |
nikitateggi | 31:0f67acfc6236 | 588 | TFT.fillrect(5,90,230,150,White); |
nikitateggi | 31:0f67acfc6236 | 589 | TFT.locate(50,100) ; |
nikitateggi | 31:0f67acfc6236 | 590 | TFT.printf("ERROR!") ; |
nikitateggi | 31:0f67acfc6236 | 591 | TFT.locate(20,130) ; |
nikitateggi | 31:0f67acfc6236 | 592 | TFT.printf("Take ReTest") ; |
nikitateggi | 31:0f67acfc6236 | 593 | //TFT.locate(45,160) ; |
nikitateggi | 31:0f67acfc6236 | 594 | // TFT.printf("") ; |
nikitateggi | 31:0f67acfc6236 | 595 | TFT.BusEnable(false) ; |
nikitateggi | 31:0f67acfc6236 | 596 | backlight = 1 ; |
nikitateggi | 31:0f67acfc6236 | 597 | } |
nikitateggi | 31:0f67acfc6236 | 598 | |
nikitateggi | 31:0f67acfc6236 | 599 | |
avp2417 | 35:43133f017ed4 | 600 | void glc_error() //glc replace test strip |
nikitateggi | 31:0f67acfc6236 | 601 | { |
nikitateggi | 31:0f67acfc6236 | 602 | backlight = 0 ; |
nikitateggi | 31:0f67acfc6236 | 603 | TFT.BusEnable(true) ; |
nikitateggi | 31:0f67acfc6236 | 604 | TFT.background(White) ; |
nikitateggi | 31:0f67acfc6236 | 605 | TFT.foreground(Red) ; |
nikitateggi | 31:0f67acfc6236 | 606 | TFT.fillrect(5,90,230,300,White); |
avp2417 | 35:43133f017ed4 | 607 | TFT.locate(60,100) ; //changed from 50 to 60 //rashmi 22/7/17 |
avp2417 | 35:43133f017ed4 | 608 | TFT.printf("Replace") ; |
avp2417 | 35:43133f017ed4 | 609 | TFT.locate(40,130) ; //changed from 20 to 40 //rashmi 22/7/17 |
avp2417 | 35:43133f017ed4 | 610 | TFT.printf("Test Strip") ; |
nikitateggi | 31:0f67acfc6236 | 611 | //TFT.locate(45,160) ; |
nikitateggi | 31:0f67acfc6236 | 612 | // TFT.printf("") ; |
nikitateggi | 31:0f67acfc6236 | 613 | TFT.BusEnable(false) ; |
nikitateggi | 31:0f67acfc6236 | 614 | backlight = 1 ; |
nikitateggi | 31:0f67acfc6236 | 615 | } |
nikitateggi | 31:0f67acfc6236 | 616 | |
nikitateggi | 31:0f67acfc6236 | 617 | |
avp2417 | 35:43133f017ed4 | 618 | void BT_connection() |
nikitateggi | 31:0f67acfc6236 | 619 | { |
nikitateggi | 31:0f67acfc6236 | 620 | backlight = 0 ; |
nikitateggi | 31:0f67acfc6236 | 621 | TFT.BusEnable(true) ; |
nikitateggi | 31:0f67acfc6236 | 622 | TFT.background(White) ; |
nikitateggi | 31:0f67acfc6236 | 623 | TFT.foreground(Blue) ; |
nikitateggi | 31:0f67acfc6236 | 624 | TFT.fillrect(5,90,230,300,White); |
nikitateggi | 31:0f67acfc6236 | 625 | TFT.locate(40,140) ; |
nikitateggi | 31:0f67acfc6236 | 626 | TFT.printf("Connected") ; |
nikitateggi | 31:0f67acfc6236 | 627 | TFT.locate(20,170) ; |
nikitateggi | 31:0f67acfc6236 | 628 | TFT.printf("Sending Files") ; |
nikitateggi | 31:0f67acfc6236 | 629 | //TFT.locate(45,160) ; |
nikitateggi | 31:0f67acfc6236 | 630 | // TFT.printf("") ; |
nikitateggi | 31:0f67acfc6236 | 631 | TFT.BusEnable(false) ; |
nikitateggi | 31:0f67acfc6236 | 632 | backlight = 1 ; |
nikitateggi | 31:0f67acfc6236 | 633 | } |
nikitateggi | 31:0f67acfc6236 | 634 | |
nikitateggi | 31:0f67acfc6236 | 635 | void BT_no_connection() |
nikitateggi | 31:0f67acfc6236 | 636 | { |
nikitateggi | 31:0f67acfc6236 | 637 | backlight = 0 ; |
nikitateggi | 31:0f67acfc6236 | 638 | TFT.BusEnable(true) ; |
nikitateggi | 31:0f67acfc6236 | 639 | TFT.background(White) ; |
nikitateggi | 31:0f67acfc6236 | 640 | TFT.foreground(Blue) ; |
nikitateggi | 31:0f67acfc6236 | 641 | TFT.fillrect(5,90,230,300,White); |
nikitateggi | 31:0f67acfc6236 | 642 | TFT.locate(80,140) ; |
nikitateggi | 31:0f67acfc6236 | 643 | TFT.printf("Not") ; |
nikitateggi | 31:0f67acfc6236 | 644 | TFT.locate(40,160) ; |
nikitateggi | 31:0f67acfc6236 | 645 | TFT.printf("Connected") ; |
nikitateggi | 31:0f67acfc6236 | 646 | //TFT.locate(45,160) ; |
nikitateggi | 31:0f67acfc6236 | 647 | // TFT.printf("") ; |
nikitateggi | 31:0f67acfc6236 | 648 | TFT.BusEnable(false) ; |
nikitateggi | 31:0f67acfc6236 | 649 | backlight = 1 ; |
nikitateggi | 31:0f67acfc6236 | 650 | } |
nikitateggi | 31:0f67acfc6236 | 651 | |
nikitateggi | 31:0f67acfc6236 | 652 | void BT_finished() |
nikitateggi | 31:0f67acfc6236 | 653 | { |
nikitateggi | 31:0f67acfc6236 | 654 | backlight = 0 ; |
nikitateggi | 31:0f67acfc6236 | 655 | TFT.BusEnable(true) ; |
nikitateggi | 31:0f67acfc6236 | 656 | TFT.background(White) ; |
nikitateggi | 31:0f67acfc6236 | 657 | TFT.foreground(Blue) ; |
nikitateggi | 31:0f67acfc6236 | 658 | TFT.fillrect(5,90,230,300,White); |
nikitateggi | 31:0f67acfc6236 | 659 | TFT.locate(20,140) ; |
nikitateggi | 31:0f67acfc6236 | 660 | TFT.printf("Files Tranfer") ; |
nikitateggi | 31:0f67acfc6236 | 661 | TFT.locate(40,170) ; |
nikitateggi | 31:0f67acfc6236 | 662 | TFT.printf("Completed") ; |
nikitateggi | 31:0f67acfc6236 | 663 | //TFT.locate(45,160) ; |
nikitateggi | 31:0f67acfc6236 | 664 | // TFT.printf("") ; |
nikitateggi | 31:0f67acfc6236 | 665 | TFT.BusEnable(false) ; |
nikitateggi | 31:0f67acfc6236 | 666 | backlight = 1 ; |
nikitateggi | 31:0f67acfc6236 | 667 | } |
nikitateggi | 31:0f67acfc6236 | 668 | |
nikitateggi | 31:0f67acfc6236 | 669 | |
nikitateggi | 31:0f67acfc6236 | 670 | void screen_BT_return() // BT main screen |
nikitateggi | 31:0f67acfc6236 | 671 | { |
nikitateggi | 31:0f67acfc6236 | 672 | backlight = 0 ; |
nikitateggi | 31:0f67acfc6236 | 673 | TFT.BusEnable(true) ; |
nikitateggi | 31:0f67acfc6236 | 674 | TFT.background(Green) ; |
nikitateggi | 31:0f67acfc6236 | 675 | TFT.foreground(Black) ; |
nikitateggi | 31:0f67acfc6236 | 676 | TFT.fillrect(5,90,230,300,White); |
nikitateggi | 31:0f67acfc6236 | 677 | TFT.fillrect( 60,230,180,300,Green); |
nikitateggi | 31:0f67acfc6236 | 678 | TFT.locate(80,250) ; |
nikitateggi | 31:0f67acfc6236 | 679 | TFT.printf("MAIN") ; |
nikitateggi | 31:0f67acfc6236 | 680 | TFT.BusEnable(false) ; |
nikitateggi | 31:0f67acfc6236 | 681 | backlight = 1 ; |
nikitateggi | 31:0f67acfc6236 | 682 | |
nikitateggi | 31:0f67acfc6236 | 683 | } |
nikitateggi | 31:0f67acfc6236 | 684 | |
nikitateggi | 31:0f67acfc6236 | 685 | |
nikitateggi | 31:0f67acfc6236 | 686 | void screen_patient_info(uint32_t current_test_pid,uint32_t bt_file_sent_pid) |
nikitateggi | 31:0f67acfc6236 | 687 | { |
avp2417 | 35:43133f017ed4 | 688 | |
nikitateggi | 31:0f67acfc6236 | 689 | char buf[10]; |
avp2417 | 35:43133f017ed4 | 690 | sprintf (buf, "Test pid:%d",current_test_pid); //changed from 'current pid' to 'Test pid' //rashmi 24/7/17 |
nikitateggi | 31:0f67acfc6236 | 691 | backlight = 0 ; |
nikitateggi | 31:0f67acfc6236 | 692 | TFT.BusEnable(true) ; |
nikitateggi | 31:0f67acfc6236 | 693 | TFT.background(White); |
nikitateggi | 31:0f67acfc6236 | 694 | TFT.foreground(Blue); |
nikitateggi | 31:0f67acfc6236 | 695 | TFT.fillrect(5,90,230,300,White); |
avp2417 | 35:43133f017ed4 | 696 | TFT.locate(15,140) ; //changed from 20 to 15 //rashmi 24/7/17 |
avp2417 | 35:43133f017ed4 | 697 | TFT.printf(buf) ; |
avp2417 | 35:43133f017ed4 | 698 | sprintf (buf,"BT pid :%d",bt_file_sent_pid); |
avp2417 | 35:43133f017ed4 | 699 | TFT.locate(15,170) ; //changed from 20 to 15 //rashmi 24/7/17 |
nikitateggi | 31:0f67acfc6236 | 700 | TFT.printf(buf) ; |
nikitateggi | 31:0f67acfc6236 | 701 | TFT.background(Green) ; |
nikitateggi | 31:0f67acfc6236 | 702 | TFT.foreground(Black) ; |
nikitateggi | 31:0f67acfc6236 | 703 | TFT.fillrect( 60,230,180,300,Green); |
nikitateggi | 31:0f67acfc6236 | 704 | TFT.locate(80,250) ; |
nikitateggi | 31:0f67acfc6236 | 705 | TFT.printf("MAIN") ; |
nikitateggi | 31:0f67acfc6236 | 706 | TFT.BusEnable(false) ; |
nikitateggi | 31:0f67acfc6236 | 707 | backlight = 1 ; |
nikitateggi | 31:0f67acfc6236 | 708 | |
nikitateggi | 31:0f67acfc6236 | 709 | } |