Browse Source

Bypass Auto pump/vent functions while ATM mode.

sangwq 1 year ago
parent
commit
91d10bde6f
1 changed files with 13 additions and 2 deletions
  1. 13 2
      Venus/Venus_RT/Modules/LLs/LLEntity.cs

+ 13 - 2
Venus/Venus_RT/Modules/LLs/LLEntity.cs

@@ -182,7 +182,7 @@ namespace Venus_RT.Modules
             Transition(STATE.Ready_For_TM,      MSG.TM_Exchange_Ready,  null,                   STATE.Idle);
             Transition(STATE.Ready_For_TM,      MSG.Prepare_TM,         null,                   STATE.Ready_For_TM);
             Transition(STATE.Ready_For_TM,      MSG.Abort,              null,                   STATE.Idle);
-            Transition(STATE.Ready_For_TM,      MSG.AutoVent,           FnStartVent,            STATE.Venting);
+            Transition(STATE.Ready_For_TM,      MSG.AutoVent,           FnTryAutoVent,          STATE.Venting);
 
             // Prepare EFEM Transfer
             Transition(STATE.Idle,              MSG.Prepare_EFEM,       FnStartPrepareEFEM,     STATE.Prepare_For_EFEM);
@@ -319,6 +319,17 @@ namespace Venus_RT.Modules
             return _ventingRoutine.Start() == RState.Running;
         }
 
+        private bool FnTryAutoVent(object[] param)
+        {
+            if (RouteManager.IsATMMode)
+            {
+                PostMsg(MSG.TM_Exchange_Ready);
+                return false;
+            }
+
+            return _ventingRoutine.Start() == RState.Running;
+        }
+
         private bool FnVentTimeout(object[] param)
         {
             RState ret = _ventingRoutine.Monitor();
@@ -362,7 +373,7 @@ namespace Venus_RT.Modules
 
         private bool FnTryAutoPump(object[] param)
         {
-            if(_JetTM.LLPumpStatus != JetTM.LLPumpState.Idle)
+            if(_JetTM.LLPumpStatus != JetTM.LLPumpState.Idle || RouteManager.IsATMMode)
             {
                 PostMsg(MSG.EFEM_Exchange_Ready);
                 return false;