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 Oxford CWM Team

Files at this revision

API Documentation at this revision

Comitter:
mlin
Date:
Thu May 25 12:05:17 2017 +0000
Parent:
24:93e1474d6d8b
Child:
26:47271cf8d6b2
Commit message:
updated the drawing intracacies

Changed in this revision

settings.h Show annotated file Show diff for this revision Revisions of this file
--- a/settings.h	Thu May 25 11:57:26 2017 +0000
+++ b/settings.h	Thu May 25 12:05:17 2017 +0000
@@ -68,19 +68,42 @@
             ty = 150;
             TFT.fillcircle(tx, ty - 10, 2, White);
             TFT.fillcircle(tx, ty + 10, 2, White);
-    
-
-}
-
-void drawsettinganimate() //draw alarm, time, date
-{
-    TFT.rect(50,0,320,100,Blue);  //set alarm box
+     TFT.rect(50,0,320,100,Blue);  //set alarm box
     TFT.rect(50,100,320,200,White); //set time box
     TFT.rect(50,200,320,240,White); //set date box
 
     TFT.set_font((unsigned char*) Arial12x12); //set alarm title
     TFT.locate(157,8);
     TFT.printf("Set Alarm");
+    //Cancel button 
+    TFT.set_font((unsigned char*) Arial12x12); 
+    TFT.locate(62,20);
+    TFT.set_orientation(0);
+    TFT.background(White);
+    TFT.foreground(Black);
+    TFT.printf("Cancel");
+    TFT.background(Black);
+    TFT.foreground(White);
+    TFT.set_orientation(1);
+
+    //Set New button (used to set new alarm/time/date)
+    
+    TFT.locate(161,20);
+    TFT.set_orientation(0);
+    TFT.background(Blue);
+    TFT.printf("Set New");
+    TFT.background(Black);
+    TFT.set_orientation(1);
+     //home button
+    TFT.locate(5,217);
+    TFT.foreground(Blue);
+    TFT.printf("Home");
+    TFT.foreground(White);
+}
+
+void drawsettinganimate() //draw alarm, time, date
+{
+   
 
 
     TFT.set_font((unsigned char*) Arial28x28); //set alarm hour
@@ -117,33 +140,11 @@
     TFT.locate(265,215);
     TFT.printf("year");
 
-    //Cancel button 
-    TFT.set_font((unsigned char*) Arial12x12); 
-    TFT.locate(62,20);
-    TFT.set_orientation(0);
-    TFT.background(White);
-    TFT.foreground(Black);
-    TFT.printf("Cancel");
-    TFT.background(Black);
-    TFT.foreground(White);
-    TFT.set_orientation(1);
-
-    //Set New button (used to set new alarm/time/date)
     
-    TFT.locate(161,20);
-    TFT.set_orientation(0);
-    TFT.background(Blue);
-    TFT.printf("Set New");
-    TFT.background(Black);
-    TFT.set_orientation(1);
-     //home button
-    TFT.locate(5,217);
-    TFT.foreground(Blue);
-    TFT.printf("Home");
-    TFT.foreground(White);
 
     
 }
 void settings() {
+    int a_h, a_m, t_h, t_m,t_d,t_mo,t_y = 0;
     
-    }
\ No newline at end of file
+}
\ No newline at end of file