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
Diff: touch_modules.cpp
- Revision:
- 3:9a06c2bed650
- Parent:
- 1:8316c23ec6b9
- Child:
- 4:6bd81bb1790d
diff -r 3b7b71bfc941 -r 9a06c2bed650 touch_modules.cpp --- a/touch_modules.cpp Mon Jan 30 10:57:38 2017 +0000 +++ b/touch_modules.cpp Fri Feb 10 10:39:13 2017 +0000 @@ -29,16 +29,18 @@ { wait_ms(200); ///wait for debounce check if (Touch_D) - { - Touch_D.fall(&touch1); //determine the touch co-ordinates + { + + Touch_D.fall(&touch1); + //determine the touch co-ordinates break; } - DisableTouch(); + DisableTouch(); //kc.printf("touch"); } } - + EnableTouch(); } @@ -118,7 +120,7 @@ } else if ( ((xt >= 35) && (xt<=100)) && ( (yt>= 65) && (yt<= 118) ) ) // BP { - //state=5; + state=6; } else if ( ((xt >= 130) && (xt<=195)) && ( (yt>= 65) && (yt<= 118) ) ) // Home @@ -182,36 +184,17 @@ { unsigned char state; -if ( ((xt >=28) && (xt<=125)) && ( (yt>= 225) && (yt<= 285) ) ) - { - state=1; - - } - - else if ( ((xt >=35) && (xt<=100)) && ( (yt>= 135) && (yt<= 185) ) ) + if ( ((xt >=70) && (xt<=170)) && ( (yt>= 140) && (yt<= 195) ) ) // GLC { - state=2; - + state=11; } - else if ( ((xt >=130) && (xt<=195)) && ( (yt>= 135) && (yt<= 185) ) ) - { - state=3; - - - } - else if ( ((xt >= 35) && (xt<=100)) && ( (yt>= 65) && (yt<= 118) ) ) + else if ( ((xt >=70) && (xt<=170)) && ( (yt>=90) && (yt<=140) ) ) // ECG { - state=4; - - } - else if ( ((xt >= 130) && (xt<=195)) && ( (yt>= 65) && (yt<= 118) ) ) - { - state=5; - - } - else + // state=2; + } + else state=10; return state;