Mike Moore / Mbed 2 deprecated RTOS_HW_07

Dependencies:   mbed-rtos mbed C12832_lcd LM75B

Revision:
64:255295f1d782
Parent:
63:63f362bcc2ac
Child:
65:e39360da5929
diff -r 63f362bcc2ac -r 255295f1d782 main.cpp
--- a/main.cpp	Wed Sep 11 02:34:41 2013 +0000
+++ b/main.cpp	Wed Sep 11 02:44:04 2013 +0000
@@ -81,6 +81,7 @@
 
     Ticker       tickerButtonStateManager;      // manage the button states.
     Ticker       tickerSlowClock;               // generate a ~1Hz clock.
+    Ticker       tickerCookCountdown;           // remaining cook time.
     
  //   Timer        timerFSMdone;                  // duration of FSM 'done' state.
 
@@ -105,6 +106,7 @@
     void threadButtonStateManager(void const *args);
     void threadTotalTimeControl(void const *args);
     void threadCookStateFSM(void const *args);
+    void cookRemainingTime();                   // remaining time countdown.
     
     void temperatureThread(void const *args);   // temperature measurement.
     void LCDthread        (void const *args);   // LCD display thread.
@@ -140,6 +142,9 @@
  //     timerFSMdone.start();                 // start 'done' timer.
  
       tickerSlowClock.attach_us(&slowClock         ,SLOWCLOCKuS);
+      
+                                                // count-down by one second.
+      tickerCookCountdown.attach(&cookRemainingTime,1);
  
       
       Thread thread_1(temperatureThread       ,NULL,osPriorityIdle,DEFAULT_STACK_SIZE,NULL);
@@ -523,5 +528,11 @@
       }                                         // thread loop.
     }                                           // LCDthread.
 /*----------------------------------------------//----------------------------*/
+    void cookRemainingTime(void)                // cook-cycle countdown.
+    {
+    
+    
+    
+    }
 
-
+/*----------------------------------------------//----------------------------*/
\ No newline at end of file