homework 7

Dependencies:   mbed-rtos mbed C12832_lcd LM75B

Files at this revision

API Documentation at this revision

Comitter:
gatedClock
Date:
Thu Sep 12 20:22:43 2013 +0000
Parent:
99:a3e8344024c0
Child:
101:33dc62b6b728
Commit message:
there's a couple of seconds between done and idle states. why?

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Sep 12 20:18:12 2013 +0000
+++ b/main.cpp	Thu Sep 12 20:22:43 2013 +0000
@@ -484,6 +484,7 @@
           case  FSM_DONE :                      // DONE.
           {
             led0 = 1;
+            led3 = 0;
             if (dFSMstate != dFSMstateLast)     // if just entered state.
             { 
 
@@ -506,6 +507,9 @@
             dFSMstateLast = dFSMstate;
             if (beepTimer.read() >= BEEPTIME) dFSMstate = FSM_IDLE;
             else dFSMstate = FSM_DONE; 
+            
+            led3 = 1;
+            
             break;
           }       
 //---           
@@ -811,8 +815,7 @@
         
         case RT_CLEAR    :                      // clear countdown.
         {
-          dRemainingTime = 0;      
-          led3 = 1;         
+          dRemainingTime = 0;        
           break;
         }