First draft to the functional spec

Dependencies:   mbed Grove_LCD_RGB_Backlight DebounceIn

Files at this revision

API Documentation at this revision

Comitter:
bmcclure
Date:
Wed Oct 09 17:47:50 2019 +0000
Parent:
3:07d400d50a96
Commit message:
Fixed a simulation bug and a bug when buttons are pressed with the door open

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 07d400d50a96 -r d56051982cf5 main.cpp
--- a/main.cpp	Tue Oct 08 21:24:47 2019 +0000
+++ b/main.cpp	Wed Oct 09 17:47:50 2019 +0000
@@ -294,11 +294,19 @@
             greenRelay  = OUT_OFF;  //green light OFF
             yellowRelay = OUT_OFF;
             redRelay    = OUT_ON;   //turn red light ON
-            fanRelay    = OUT_ON;   //fan on   
+            if(!simulateMode)
+            {
+                fanRelay    = OUT_ON;   //fan on   
+            }
             damperRotate(1);        //damper opened       
             rgbLCD.locate(0,1);
             rgbLCD.print("Door open       ");
             doorHasOpened = true;        
+            
+            if(cycleStartBtt == IN_ON || stopBtt == IN_ON)
+            {
+                cancelPending = true;
+            }
         }
             
         wait(1);
@@ -410,7 +418,7 @@
         else // start pressed
         {
             strcat(displayLine1, "0 ");
-            if(stopBtt == IN_OFF && doorClosed == IN_OFF)
+            if(stopBtt == IN_OFF && doorClosed == IN_OFF && !simulateMode)
             {
                 fanRelay    = OUT_ON;
             }