Contains the main execution of the clock uses headers to import functions
Dependencies: RTC-DS1307 SPI_TFT_ILI9341 TFT_fonts mbed tsi_sensor
Fork of TFT_Mikroelectronika_IL9341_sketchpad by
Revision 30:af38c80391cb, committed 2017-05-25
- Comitter:
- Owenmatthewmcgowan
- Date:
- Thu May 25 13:24:26 2017 +0000
- Parent:
- 29:684e2a3e17b5
- Child:
- 31:3255668e6b08
- Child:
- 35:138b7d7cc3a1
- Commit message:
- .
Changed in this revision
render.h | Show annotated file Show diff for this revision Revisions of this file |
settings.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/render.h Thu May 25 13:16:32 2017 +0000 +++ b/render.h Thu May 25 13:24:26 2017 +0000 @@ -35,7 +35,8 @@ } } void whiteboard() -{ +{ + TFT.cls(); int color = 0; int xpos = 0,ypos = 0,xp = 0,yp = 0,sw = 0;; drawbuttons(); @@ -51,7 +52,7 @@ // xp=(240*(xpos-5800))/51200; // yp=320-(320*(ypos-3000))/58300; if(touching == 1) pc.printf("\txp=%d\t,\typo=%d\n\r", xp, yp); - if(xp > 5 && yp > 50 && touching == 1) TFT.fillcircle(yp, xp, 2, color); + if(xp > 5 && yp > 50 && touching == 1) TFT.fillcircle(xp,yp, 2, color); if(yp < 50) { // color buttons sw = (int)xp / 50; switch(sw) {
--- a/settings.h Thu May 25 13:16:32 2017 +0000 +++ b/settings.h Thu May 25 13:24:26 2017 +0000 @@ -33,6 +33,7 @@ void drawsettingback() //Navigation Buttons { + TFT.cls(); TFT.fillrect(0,0,50,100,Blue); //set alarm button TFT.fillrect(0,100,50,200,White); //set time button @@ -127,9 +128,10 @@ int multiplier = 8; int o_setting = 11; drawsettingback(); + int option = 0; while (true){ drawsettinganimate(a_h, a_m,t_h,t_m,t_d,t_mo,t_y); - int option = setting_press(); + option = setting_press(); int newval = 0; if (option == 0 || option == 2) break; switch (option) {