![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
homework 7
Dependencies: mbed-rtos mbed C12832_lcd LM75B
Diff: main.cpp
- Revision:
- 68:cbebcfc948aa
- Parent:
- 67:1d9c85a4c3c1
- Child:
- 69:55b836e8ced7
--- a/main.cpp Wed Sep 11 18:00:47 2013 +0000 +++ b/main.cpp Wed Sep 11 18:07:15 2013 +0000 @@ -309,22 +309,26 @@ if (dFSMstate == FSM_IDLE) // idle state. { + pc.printf("\n\r FSM_IDLE"); if (dButtonStart & !dDoorOpen & dTimeRemaining) dFSMstate = FSM_COOK; } else if (dFSMstate == FSM_COOK) // cook state. { - if (dDoorOpen & dTimeRemaining) dFSMstate = FSM_PAUSE; + pc.printf("\n\r FSM_COOK"); + if (dDoorOpen & dTimeRemaining) dFSMstate = FSM_PAUSE; } else if (dFSMstate == FSM_PAUSE) // pause state. { + pc.printf("\n\r FSM_PAUSE"); if (dButtonStart & !dDoorOpen & dTimeRemaining) dFSMstate = FSM_DONE; if (dButtonStop) dFSMstate = FSM_COOK; } else if (dFSMstate == FSM_DONE) // incomplete. { + pc.printf("\n\r FSM_DONE"); // timerFSMdone.reset(); // reset the timer. dFSMstate = FSM_IDLE; // end of beep. } @@ -511,10 +515,7 @@ if (dLCDtotalCookTimeSec != dLCDtotalCookTimeSecLast || dCookTimeRemainingSec != dCookTimeRemainingSecLast || fLCDcelsius != fLCDcelsiusLast) - { lcd.cls(); - pc.printf("\n\r cleared LCD."); - } LCD1; // line 1. lcd.printf(" total cook time: %d",dLCDtotalCookTimeSec);