Browse Source

update scheduler vpw

chenkui 4 days ago
parent
commit
27ef723aba
1 changed files with 14 additions and 3 deletions
  1. 14 3
      PunkHPX8_RT/Schedulers/VPW/SchedulerVPW.cs

+ 14 - 3
PunkHPX8_RT/Schedulers/VPW/SchedulerVPW.cs

@@ -81,10 +81,21 @@ namespace PunkHPX8_RT.Schedulers.Srd
             {
                 _isStartRunRecipe = _vpwEntity.State == (int)VPWCellState.RunReciping;
             }
-            if (_isStartRunRecipe && _vpwEntity.IsIdle)
+            if (_isStartRunRecipe)
             {
-                _state = RState.End;
-                _isStartRunRecipe = false;
+                VpwMainEntity vpwMainEntity = Singleton<RouteManager>.Instance.GetModule<VpwMainEntity>(ModuleName.VPWMain1.ToString());
+                if (_vpwEntity.IsIdle)
+                {
+                    if (vpwMainEntity.IsChamberClosed)
+                    {
+                        _vpwEntity.CheckToPostMessage<VPWCellState, VPWCellMsg>(eEvent.INFO_VPW, Module.ToString(), (int)VPWCellMsg.ChamberDown);
+                    }
+                    else
+                    {
+                        _state = RState.End;
+                        _isStartRunRecipe = false;
+                    }
+                }
             }
             return true;
         }