Updated with option to return from BP screen to main screen, resolved screen navigation issues
Dependencies: SDFileSystem TFTLCD_8bit ds3231 program mbed
Fork of poc_dis_5 by
display_modules.cpp@5:a3ea7c82b7e1, 2017-03-30 (annotated)
- Committer:
- suhasini
- Date:
- Thu Mar 30 11:34:04 2017 +0000
- Revision:
- 5:a3ea7c82b7e1
- Parent:
- 4:6bd81bb1790d
PID updation possible, Proper screen navigation enabled, Return functionality from BP to main screen-done, date-time format modified, BP data not saved into SD card
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 "ili9325.h" |
nikitateggi | 0:c47fb0c1bbf6 | 3 | #include "lcd_base.h" |
nikitateggi | 0:c47fb0c1bbf6 | 4 | #include "display_modules.h" |
nikitateggi | 0:c47fb0c1bbf6 | 5 | #include "touch_modules.h" |
nikitateggi | 1:8316c23ec6b9 | 6 | #include "rtc.h" |
nikitateggi | 3:9a06c2bed650 | 7 | //#include "main.h" |
nikitateggi | 0:c47fb0c1bbf6 | 8 | |
nikitateggi | 0:c47fb0c1bbf6 | 9 | |
nikitateggi | 4:6bd81bb1790d | 10 | BusOut dataBus( PTC12, PTC13, PTB10, PTC9, PTD4, PTD5, PTD6, PTD7 ); // 16 pins//POC DISPALY 240*320 pixels |
nikitateggi | 0:c47fb0c1bbf6 | 11 | ILI9325_LCD lcd( PTC5, PTB9, PTC0, PTB0, &dataBus, NC, PTE31); |
nikitateggi | 0:c47fb0c1bbf6 | 12 | |
nikitateggi | 0:c47fb0c1bbf6 | 13 | |
nikitateggi | 1:8316c23ec6b9 | 14 | void init_screen() // initializing the screen |
nikitateggi | 1:8316c23ec6b9 | 15 | { |
nikitateggi | 1:8316c23ec6b9 | 16 | lcd.Initialize(PORTRAIT); |
nikitateggi | 1:8316c23ec6b9 | 17 | } |
nikitateggi | 0:c47fb0c1bbf6 | 18 | |
nikitateggi | 4:6bd81bb1790d | 19 | void screen_main() //main screen |
nikitateggi | 0:c47fb0c1bbf6 | 20 | { |
nikitateggi | 1:8316c23ec6b9 | 21 | char buff1[32]; |
nikitateggi | 1:8316c23ec6b9 | 22 | time_t epoch_time; |
nikitateggi | 1:8316c23ec6b9 | 23 | lcd.ClearScreen(); |
nikitateggi | 1:8316c23ec6b9 | 24 | lcd.SetFont(&TerminusFont); |
nikitateggi | 4:6bd81bb1790d | 25 | epoch_time=rtc_read(); // read the time from rtc module |
suhasini | 5:a3ea7c82b7e1 | 26 | // sprintf(buff1 ,"%s", ctime(&epoch_time)); // display time on LCD |
suhasini | 5:a3ea7c82b7e1 | 27 | strftime(buff1, 32, "%d/%m/%Y %H:%M",localtime(&epoch_time)); |
nikitateggi | 1:8316c23ec6b9 | 28 | lcd.Print( buff1,20,100,COLOR_YELLOW,COLOR_BLACK, 0); |
nikitateggi | 1:8316c23ec6b9 | 29 | lcd.SetFont(&TerminusBigFont); |
nikitateggi | 1:8316c23ec6b9 | 30 | lcd.Print( "SENSESEMI",50,20,COLOR_WHITE,COLOR_BLACK, 0); |
nikitateggi | 1:8316c23ec6b9 | 31 | lcd.Print( "SenseSmart",45,60,COLOR_WHITE,COLOR_BLACK, 0);// align text to center horizontally and use starndard colors |
nikitateggi | 1:8316c23ec6b9 | 32 | lcd.FillRoundRect(60,130,180,200,COLOR_YELLOW); |
nikitateggi | 1:8316c23ec6b9 | 33 | lcd.Print( "SYS",100,140,COLOR_BLACK,COLOR_YELLOW,0); |
nikitateggi | 1:8316c23ec6b9 | 34 | lcd.Print( "CONFIG",70,170,COLOR_BLACK,COLOR_YELLOW,0); |
nikitateggi | 1:8316c23ec6b9 | 35 | lcd.FillRoundRect(60,230,180,300,COLOR_GREEN); |
nikitateggi | 1:8316c23ec6b9 | 36 | lcd.Print( "TEST",90,250,COLOR_BLACK,COLOR_GREEN,0); |
nikitateggi | 3:9a06c2bed650 | 37 | |
nikitateggi | 3:9a06c2bed650 | 38 | } |
nikitateggi | 1:8316c23ec6b9 | 39 | |
nikitateggi | 4:6bd81bb1790d | 40 | |
nikitateggi | 4:6bd81bb1790d | 41 | |
nikitateggi | 4:6bd81bb1790d | 42 | void screen_main_2(int pid) // test main screen |
nikitateggi | 1:8316c23ec6b9 | 43 | { |
nikitateggi | 1:8316c23ec6b9 | 44 | |
nikitateggi | 1:8316c23ec6b9 | 45 | char buff2[10]; |
nikitateggi | 3:9a06c2bed650 | 46 | |
suhasini | 5:a3ea7c82b7e1 | 47 | lcd.FillRect(5,20,250,150,COLOR_BLACK); |
nikitateggi | 1:8316c23ec6b9 | 48 | //lcd.Print( "SenseSmart", CENTER, 95); |
nikitateggi | 4:6bd81bb1790d | 49 | sprintf(buff2 ,"%d", pid); |
nikitateggi | 4:6bd81bb1790d | 50 | lcd.Print( "PATIENT ID",20,50,COLOR_YELLOW,COLOR_BLACK, 0); |
nikitateggi | 4:6bd81bb1790d | 51 | lcd.Print(buff2,200,50,COLOR_YELLOW,COLOR_BLACK, 0); |
nikitateggi | 1:8316c23ec6b9 | 52 | |
nikitateggi | 1:8316c23ec6b9 | 53 | lcd.SetFont(&TerminusBigFont); |
nikitateggi | 3:9a06c2bed650 | 54 | // lcd.FillRect(5,120,230,320,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 55 | lcd.FillRoundRect(60,130,180,200,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 56 | lcd.FillRoundRect(60,230,180,300,COLOR_BLACK); |
nikitateggi | 0:c47fb0c1bbf6 | 57 | lcd.FillRoundRect(10,130,100,200,COLOR_CYAN); |
nikitateggi | 0:c47fb0c1bbf6 | 58 | lcd.Print( "BG",40,160,COLOR_BLACK,COLOR_CYAN,0); |
nikitateggi | 0:c47fb0c1bbf6 | 59 | lcd.FillRoundRect(130,130,220,200,COLOR_YELLOW); |
nikitateggi | 0:c47fb0c1bbf6 | 60 | lcd.Print( "ECG",160,160,COLOR_BLACK,COLOR_YELLOW,0); |
nikitateggi | 0:c47fb0c1bbf6 | 61 | lcd.FillRoundRect(10,215,100,285,COLOR_MAGENTA); |
nikitateggi | 0:c47fb0c1bbf6 | 62 | lcd.Print( "BP",40,245,COLOR_BLACK,COLOR_MAGENTA,0); |
nikitateggi | 0:c47fb0c1bbf6 | 63 | lcd.FillRoundRect(130,215,220,285,COLOR_GREEN); |
nikitateggi | 1:8316c23ec6b9 | 64 | lcd.Print( "HOME",150,245,COLOR_BLACK,COLOR_GREEN,0); |
nikitateggi | 3:9a06c2bed650 | 65 | |
nikitateggi | 1:8316c23ec6b9 | 66 | } |
nikitateggi | 1:8316c23ec6b9 | 67 | |
nikitateggi | 1:8316c23ec6b9 | 68 | |
nikitateggi | 0:c47fb0c1bbf6 | 69 | |
nikitateggi | 4:6bd81bb1790d | 70 | void screen_main_1() // System Configuration main screen |
nikitateggi | 1:8316c23ec6b9 | 71 | { |
nikitateggi | 3:9a06c2bed650 | 72 | |
nikitateggi | 1:8316c23ec6b9 | 73 | lcd.SetFont(&TerminusBigFont); |
nikitateggi | 1:8316c23ec6b9 | 74 | lcd.FillRect(5,127,230,320,COLOR_BLACK); |
nikitateggi | 1:8316c23ec6b9 | 75 | lcd.FillRoundRect(10,130,100,200,COLOR_CYAN); |
nikitateggi | 1:8316c23ec6b9 | 76 | lcd.Print( "BLE",30,160,COLOR_BLACK,COLOR_CYAN,0); |
nikitateggi | 1:8316c23ec6b9 | 77 | lcd.FillRoundRect(130,130,220,200,COLOR_YELLOW); |
nikitateggi | 1:8316c23ec6b9 | 78 | lcd.Print( "ERASE",140,160,COLOR_BLACK,COLOR_YELLOW,0); |
nikitateggi | 1:8316c23ec6b9 | 79 | lcd.FillRoundRect(10,215,100,285,COLOR_MAGENTA); |
nikitateggi | 1:8316c23ec6b9 | 80 | lcd.Print( "FILE",20,245,COLOR_BLACK,COLOR_MAGENTA,0); |
nikitateggi | 1:8316c23ec6b9 | 81 | lcd.FillRoundRect(130,215,220,285,COLOR_GREEN); |
nikitateggi | 1:8316c23ec6b9 | 82 | lcd.Print( "HOME",145,245,COLOR_BLACK,COLOR_GREEN,0); |
nikitateggi | 3:9a06c2bed650 | 83 | |
nikitateggi | 1:8316c23ec6b9 | 84 | } |
nikitateggi | 0:c47fb0c1bbf6 | 85 | |
nikitateggi | 0:c47fb0c1bbf6 | 86 | |
nikitateggi | 4:6bd81bb1790d | 87 | void screen_ecg() //ECG screen 1 |
nikitateggi | 0:c47fb0c1bbf6 | 88 | { |
nikitateggi | 3:9a06c2bed650 | 89 | |
nikitateggi | 3:9a06c2bed650 | 90 | // lcd.FillRect(5,127,230,320,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 91 | lcd.FillRoundRect(10,130,100,200,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 92 | lcd.FillRoundRect(130,130,220,200,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 93 | lcd.FillRoundRect(10,215,100,285,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 94 | lcd.FillRoundRect(130,215,220,285,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 95 | lcd.FillRoundRect(60,130,180,200,COLOR_YELLOW); |
nikitateggi | 4:6bd81bb1790d | 96 | lcd.Print( "START",80,150,COLOR_BLACK,COLOR_YELLOW,0); |
nikitateggi | 4:6bd81bb1790d | 97 | // lcd.Print( "CONFIG",70,170,COLOR_BLACK,COLOR_YELLOW,0); |
nikitateggi | 1:8316c23ec6b9 | 98 | lcd.FillRoundRect(60,230,180,300,COLOR_GREEN); |
nikitateggi | 1:8316c23ec6b9 | 99 | lcd.Print( "RET",100,250,COLOR_BLACK,COLOR_GREEN,0); |
nikitateggi | 3:9a06c2bed650 | 100 | |
nikitateggi | 1:8316c23ec6b9 | 101 | } |
nikitateggi | 1:8316c23ec6b9 | 102 | |
nikitateggi | 1:8316c23ec6b9 | 103 | |
nikitateggi | 0:c47fb0c1bbf6 | 104 | |
nikitateggi | 4:6bd81bb1790d | 105 | void screen_ecg_2() // ECG screen 2 |
nikitateggi | 1:8316c23ec6b9 | 106 | { |
nikitateggi | 3:9a06c2bed650 | 107 | |
nikitateggi | 4:6bd81bb1790d | 108 | lcd.FillRect(5,90,230,150,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 109 | lcd.Print( " Tst is Done ",3,100,COLOR_GREEN,COLOR_BLACK,0); |
nikitateggi | 4:6bd81bb1790d | 110 | lcd.Print( " HeartRate ",3,150,COLOR_GREEN,COLOR_BLACK,0); |
nikitateggi | 4:6bd81bb1790d | 111 | lcd.Print( " 72 bpm",3,180,COLOR_CYAN,COLOR_BLACK,0); |
nikitateggi | 3:9a06c2bed650 | 112 | // lcd.Print( "DONE", CENTER, 95); |
nikitateggi | 4:6bd81bb1790d | 113 | // lcd.Print( "s Done ",80,150,COLOR_GREEN,COLOR_BLACK,0); |
nikitateggi | 4:6bd81bb1790d | 114 | lcd.FillRect(10,215,230,290,COLOR_BLACK); |
nikitateggi | 3:9a06c2bed650 | 115 | // lcd.FillRoundRect(10,215,100,285,COLOR_MAGENTA); |
nikitateggi | 3:9a06c2bed650 | 116 | // lcd.FillRoundRect(130,215,220,285,COLOR_GREEN); |
nikitateggi | 4:6bd81bb1790d | 117 | lcd.FillRoundRect(60,230,180,300,COLOR_GREEN); |
nikitateggi | 4:6bd81bb1790d | 118 | lcd.Print( "RET",100,250,COLOR_BLACK,COLOR_GREEN,0); |
nikitateggi | 3:9a06c2bed650 | 119 | |
nikitateggi | 1:8316c23ec6b9 | 120 | } |
nikitateggi | 1:8316c23ec6b9 | 121 | |
nikitateggi | 1:8316c23ec6b9 | 122 | |
nikitateggi | 0:c47fb0c1bbf6 | 123 | |
nikitateggi | 4:6bd81bb1790d | 124 | void screen_bp() // BP main screen |
nikitateggi | 0:c47fb0c1bbf6 | 125 | { |
nikitateggi | 4:6bd81bb1790d | 126 | lcd.FillRoundRect(10,130,100,200,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 127 | lcd.FillRoundRect(130,130,220,200,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 128 | lcd.FillRoundRect(10,215,100,285,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 129 | lcd.FillRoundRect(130,215,220,285,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 130 | lcd.FillRoundRect(60,130,180,200,COLOR_YELLOW); |
nikitateggi | 4:6bd81bb1790d | 131 | lcd.Print( "START",80,150,COLOR_BLACK,COLOR_YELLOW,0); |
nikitateggi | 4:6bd81bb1790d | 132 | // lcd.Print( "CONFIG",70,170,COLOR_BLACK,COLOR_YELLOW,0); |
nikitateggi | 4:6bd81bb1790d | 133 | lcd.FillRoundRect(60,230,180,300,COLOR_GREEN); |
nikitateggi | 4:6bd81bb1790d | 134 | lcd.Print( "RET",100,250,COLOR_BLACK,COLOR_GREEN,0); |
nikitateggi | 3:9a06c2bed650 | 135 | |
nikitateggi | 3:9a06c2bed650 | 136 | } |
nikitateggi | 3:9a06c2bed650 | 137 | |
nikitateggi | 4:6bd81bb1790d | 138 | |
nikitateggi | 4:6bd81bb1790d | 139 | void screen_bp1(float SBP, float DBP) // BP screen 2 |
nikitateggi | 3:9a06c2bed650 | 140 | { |
nikitateggi | 4:6bd81bb1790d | 141 | |
nikitateggi | 4:6bd81bb1790d | 142 | char buf[10]; |
nikitateggi | 3:9a06c2bed650 | 143 | lcd.FillRoundRect(3,130,200,200,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 144 | lcd.FillRoundRect(60,230,180,300,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 145 | sprintf (buf, "SBP: %f",SBP); |
nikitateggi | 4:6bd81bb1790d | 146 | lcd.Print( buf, 5,100,COLOR_CYAN,COLOR_BLACK, 0); |
nikitateggi | 4:6bd81bb1790d | 147 | sprintf (buf, "DBP: %f",DBP); |
nikitateggi | 4:6bd81bb1790d | 148 | lcd.Print( buf, 5,150,COLOR_CYAN,COLOR_BLACK, 0); |
nikitateggi | 4:6bd81bb1790d | 149 | lcd.FillRoundRect(60,230,180,300,COLOR_GREEN); |
nikitateggi | 4:6bd81bb1790d | 150 | lcd.Print( "RET",100,250,COLOR_BLACK,COLOR_GREEN,0); |
nikitateggi | 3:9a06c2bed650 | 151 | } |
nikitateggi | 3:9a06c2bed650 | 152 | |
nikitateggi | 3:9a06c2bed650 | 153 | |
nikitateggi | 3:9a06c2bed650 | 154 | |
nikitateggi | 0:c47fb0c1bbf6 | 155 | |
nikitateggi | 0:c47fb0c1bbf6 | 156 | |
nikitateggi | 1:8316c23ec6b9 | 157 | void screen_glc() // glc main screen |
nikitateggi | 0:c47fb0c1bbf6 | 158 | { |
nikitateggi | 3:9a06c2bed650 | 159 | |
nikitateggi | 1:8316c23ec6b9 | 160 | //lcd.FillRect(5,127,230,320,COLOR_BLACK); |
nikitateggi | 3:9a06c2bed650 | 161 | // lcd.FillRect(5,127,230,320,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 162 | lcd.FillRoundRect(10,130,100,200,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 163 | lcd.FillRoundRect(130,130,220,200,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 164 | lcd.FillRoundRect(10,215,100,285,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 165 | lcd.FillRoundRect(130,215,220,285,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 166 | lcd.FillRoundRect(60,130,180,200,COLOR_YELLOW); |
nikitateggi | 4:6bd81bb1790d | 167 | lcd.Print( "START",80,150,COLOR_BLACK,COLOR_YELLOW,0); |
nikitateggi | 4:6bd81bb1790d | 168 | lcd.FillRoundRect(60,230,180,300,COLOR_GREEN); |
nikitateggi | 4:6bd81bb1790d | 169 | lcd.Print( "RET",100,250,COLOR_BLACK,COLOR_GREEN,0); |
nikitateggi | 3:9a06c2bed650 | 170 | |
nikitateggi | 0:c47fb0c1bbf6 | 171 | } |
nikitateggi | 0:c47fb0c1bbf6 | 172 | |
nikitateggi | 4:6bd81bb1790d | 173 | |
nikitateggi | 4:6bd81bb1790d | 174 | void screen_bp2() //BP screen 3 |
nikitateggi | 3:9a06c2bed650 | 175 | { |
nikitateggi | 3:9a06c2bed650 | 176 | |
nikitateggi | 3:9a06c2bed650 | 177 | lcd.FillRoundRect(3,130,200,200,COLOR_BLACK); |
nikitateggi | 3:9a06c2bed650 | 178 | lcd.FillRoundRect(60,230,180,300,COLOR_BLACK); |
nikitateggi | 3:9a06c2bed650 | 179 | lcd.FillRect(5,215,230,290,COLOR_BLACK); |
nikitateggi | 3:9a06c2bed650 | 180 | |
nikitateggi | 3:9a06c2bed650 | 181 | } |
nikitateggi | 1:8316c23ec6b9 | 182 | |
nikitateggi | 1:8316c23ec6b9 | 183 | |
nikitateggi | 4:6bd81bb1790d | 184 | void ecg_countdown() // ECG measurement countdown |
nikitateggi | 1:8316c23ec6b9 | 185 | { |
nikitateggi | 1:8316c23ec6b9 | 186 | char tim1[5]; |
nikitateggi | 3:9a06c2bed650 | 187 | |
nikitateggi | 3:9a06c2bed650 | 188 | // lcd.DrawRect(20,90,90,40,COLOR_BLACK); |
nikitateggi | 3:9a06c2bed650 | 189 | // lcd.FillRect(5,127,230,320,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 190 | lcd.FillRoundRect(3,130,200,200,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 191 | lcd.FillRoundRect(60,230,180,300,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 192 | lcd.FillRect(5,215,230,290,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 193 | lcd.Print( "ECG starts in", CENTER, 95); |
nikitateggi | 4:6bd81bb1790d | 194 | for(int i=5;i>=0;i--) |
nikitateggi | 1:8316c23ec6b9 | 195 | { |
nikitateggi | 1:8316c23ec6b9 | 196 | wait(1); |
nikitateggi | 1:8316c23ec6b9 | 197 | sprintf (tim1, "%d",i); |
nikitateggi | 1:8316c23ec6b9 | 198 | lcd.Print( tim1,120,120,COLOR_YELLOW,COLOR_BLACK, 0); |
nikitateggi | 1:8316c23ec6b9 | 199 | } |
nikitateggi | 4:6bd81bb1790d | 200 | |
nikitateggi | 4:6bd81bb1790d | 201 | lcd.Print( "Tst in Progres",3,150,COLOR_GREEN,COLOR_BLACK,0); |
nikitateggi | 3:9a06c2bed650 | 202 | |
nikitateggi | 1:8316c23ec6b9 | 203 | } |
nikitateggi | 1:8316c23ec6b9 | 204 | |
nikitateggi | 1:8316c23ec6b9 | 205 | |
nikitateggi | 1:8316c23ec6b9 | 206 | |
nikitateggi | 4:6bd81bb1790d | 207 | void screen_again() // screen to press 'yes' or 'no' to repeat the test |
nikitateggi | 1:8316c23ec6b9 | 208 | { |
nikitateggi | 3:9a06c2bed650 | 209 | |
nikitateggi | 1:8316c23ec6b9 | 210 | //lcd.DrawRect(20,90,90,40,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 211 | lcd.FillRect(5,127,230,200,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 212 | lcd.Print( "Take test",50,130 ,COLOR_CYAN,COLOR_BLACK, 0); |
nikitateggi | 4:6bd81bb1790d | 213 | lcd.Print( "again?",75,160 ,COLOR_CYAN,COLOR_BLACK, 0); |
nikitateggi | 4:6bd81bb1790d | 214 | lcd.Print( "YES",30,245,COLOR_BLACK,COLOR_MAGENTA,0); |
nikitateggi | 4:6bd81bb1790d | 215 | lcd.Print( " NO ",150,245,COLOR_BLACK,COLOR_GREEN,0); |
nikitateggi | 1:8316c23ec6b9 | 216 | //lcd.FillRect(5 ,127,230,200,COLOR_BLACK); |
nikitateggi | 1:8316c23ec6b9 | 217 | } |
nikitateggi | 1:8316c23ec6b9 | 218 | |
nikitateggi | 1:8316c23ec6b9 | 219 | |
nikitateggi | 4:6bd81bb1790d | 220 | void screen_glc_2() // GLC screen 3 after test |
nikitateggi | 1:8316c23ec6b9 | 221 | { |
nikitateggi | 3:9a06c2bed650 | 222 | |
nikitateggi | 1:8316c23ec6b9 | 223 | lcd.FillRect(5,127,230,320,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 224 | lcd.FillRoundRect(60,230,180,300,COLOR_GREEN); |
nikitateggi | 4:6bd81bb1790d | 225 | lcd.Print( "RET",100,250,COLOR_BLACK,COLOR_GREEN,0); |
nikitateggi | 1:8316c23ec6b9 | 226 | } |
nikitateggi | 1:8316c23ec6b9 | 227 | |
nikitateggi | 4:6bd81bb1790d | 228 | |
nikitateggi | 4:6bd81bb1790d | 229 | void glc_1() // GLC screen |
nikitateggi | 1:8316c23ec6b9 | 230 | { |
nikitateggi | 3:9a06c2bed650 | 231 | |
nikitateggi | 3:9a06c2bed650 | 232 | lcd.FillRoundRect(3,130,200,200,COLOR_BLACK); |
nikitateggi | 3:9a06c2bed650 | 233 | lcd.FillRoundRect(60,230,180,300,COLOR_BLACK); |
nikitateggi | 3:9a06c2bed650 | 234 | lcd.FillRect(5,215,230,290,COLOR_BLACK); |
nikitateggi | 4:6bd81bb1790d | 235 | lcd.Print( "BLOOD GLUCOSE",20,130 ,COLOR_CYAN,COLOR_BLACK, 0); // align text to center horizontally and use starndard colors |
nikitateggi | 4:6bd81bb1790d | 236 | lcd.Print( "Insert strip",5,160,COLOR_MAGENTA,COLOR_BLACK, 0); // align text to center horizontally and use starndard colors |
nikitateggi | 1:8316c23ec6b9 | 237 | } |
nikitateggi | 1:8316c23ec6b9 | 238 | |
nikitateggi | 4:6bd81bb1790d | 239 | void glc_2() // GLC screen |
nikitateggi | 1:8316c23ec6b9 | 240 | { |
nikitateggi | 3:9a06c2bed650 | 241 | |
nikitateggi | 1:8316c23ec6b9 | 242 | lcd.Print( "Strip Detected",5,160, COLOR_GREEN,COLOR_BLACK, 0); |
nikitateggi | 1:8316c23ec6b9 | 243 | lcd.Print( "Insert Blood",5,190,COLOR_RED,COLOR_BLACK, 0); |
nikitateggi | 1:8316c23ec6b9 | 244 | } |
nikitateggi | 0:c47fb0c1bbf6 | 245 | |
nikitateggi | 4:6bd81bb1790d | 246 | |
nikitateggi | 4:6bd81bb1790d | 247 | void glc_3() // GLC screen |
nikitateggi | 1:8316c23ec6b9 | 248 | { |
nikitateggi | 3:9a06c2bed650 | 249 | |
nikitateggi | 1:8316c23ec6b9 | 250 | lcd.Print( "Blood Detected",5,190,COLOR_GREEN,COLOR_BLACK, 0); |
nikitateggi | 1:8316c23ec6b9 | 251 | lcd.Print( "computing", 5,220,COLOR_MAGENTA,COLOR_BLACK, 0); |
nikitateggi | 1:8316c23ec6b9 | 252 | } |
nikitateggi | 1:8316c23ec6b9 | 253 | |
nikitateggi | 4:6bd81bb1790d | 254 | |
nikitateggi | 4:6bd81bb1790d | 255 | void glc_4(unsigned int mgdl) // GLC screen to display blood glucose level on the LCD |
nikitateggi | 1:8316c23ec6b9 | 256 | { |
nikitateggi | 3:9a06c2bed650 | 257 | |
nikitateggi | 4:6bd81bb1790d | 258 | lcd.FillRect(5,127,230,320,COLOR_BLACK); |
nikitateggi | 1:8316c23ec6b9 | 259 | char buf[10]; |
nikitateggi | 4:6bd81bb1790d | 260 | sprintf (buf, " BG %d mg/dl",mgdl); |
nikitateggi | 1:8316c23ec6b9 | 261 | lcd.Print( buf, 5,100,COLOR_YELLOW,COLOR_BLACK, 0); |
nikitateggi | 1:8316c23ec6b9 | 262 | } |