STM32F7-Discovery - TFT + Touch and Count down Timer Ver.1.0.5

Dependencies:   BSP_DISCO_F746NG LCD_DISCO_F746NG TS_DISCO_F746NG mbed

Fork of F746NG_TIMER by Enrico Marinoni

Revision:
2:a448d80c91b5
Parent:
1:478d8983fdde
Child:
3:a99d1624ff73
--- a/main.cpp	Sun Feb 28 16:57:22 2016 +0000
+++ b/main.cpp	Sun Feb 28 17:08:47 2016 +0000
@@ -1,11 +1,11 @@
 /*
     
-    TIMER
+    Countdown Timer from 1 to 199 minutes
     
     STM32F7-Discovery Demo by www.emcu.it
     
     Date: Feb.2016
-    Ver.: 1.0.1
+    Ver.: 1.0.3
 
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
@@ -165,8 +165,8 @@
         if ((TS_State.touchDetected) && (TS_State.touchX[0] > 400))
             {
             _min++;
-            if (_min>254)
-                _min=254;
+            if (_min>199)
+                _min=199;
             lcd.SetBackColor(LCD_COLOR_BLUE);
             lcd.SetTextColor(LCD_COLOR_WHITE);                
             sprintf((char*)text, " MIN: %d ", _min);
@@ -363,11 +363,11 @@
             v = Numero - (mv * 10);
             VisNumber(300, 200, LCD_YELLOW, v, LCD_COLOR_BLACK);    // Vis. 3° cifra
         } 
-        else
+        else 
         {
             // Clear 2° cifra
-            FillBox(LCD_COLOR_BLACK, 250, 250, 40, 70);
-            VisNumber(300, 200, LCD_YELLOW, v, LCD_COLOR_BLACK);    // Vis. 3° cifra
+            FillBox(LCD_COLOR_BLACK, 250, 200, 40, 70);
+            VisNumber(300, 200, LCD_YELLOW, Numero, LCD_COLOR_BLACK);    // Vis. 3° cifra
         }
     }