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

Revision:
40:05798eeadd02
Parent:
38:3fe3bafbf0c7
Child:
41:3f2e75e7fbeb
--- a/clocklogic.h	Thu May 25 19:54:51 2017 +0000
+++ b/clocklogic.h	Fri May 26 08:31:04 2017 +0000
@@ -21,7 +21,9 @@
         else if (x > 0 && x < 50 && y > 150 && y < 200) // side button 4 
         {
             //set desired state to 4
+            //f_cycle = !f_cycle;
             return 4;
+            
         }else if (x > 0 && x < 50 && y > 200 && y < 240) // button home
         {
             //set desired state to 0
@@ -116,13 +118,17 @@
         TFT.printf("%d",tm_c.mon);    
         TFT.locate(220,210);    
         TFT.printf("%d",tm_c.year);     */
-        
+        if (f_cycle){
+            f_state = 2;
+            wait(1);
+        }
         switch (digital_clock_press()){
             case (-1): break;
             case (0): f_state = 1; break;
             case (1): f_state = 2; break;
             case (2): f_state = 3; break;
             case (3): f_state = 4; break;
+            case (4): f_state = 5; break;
         }
     }
 }
\ No newline at end of file