From 2be1bf9495e52288951b61e57bda991fb1a020dc Mon Sep 17 00:00:00 2001 From: taoye Date: Tue, 10 May 2022 18:27:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=82=92=E6=9C=BA=E5=BB=B6=E6=97=B6?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BPASmartClient.MorkF/Control_MorkF.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/BPASmartClient.MorkF/Control_MorkF.cs b/BPASmartClient.MorkF/Control_MorkF.cs index 40205f73..0ee9854b 100644 --- a/BPASmartClient.MorkF/Control_MorkF.cs +++ b/BPASmartClient.MorkF/Control_MorkF.cs @@ -364,14 +364,14 @@ namespace BPASmartClient.MorkF Task.Run(new Action(() => { KitchenAdjustGears(3); - Task.Delay(1000); //大火加热1s + Task.Delay(1000).Wait(); //大火加热1s AddOil();//注油 KitchenAdjustGears(2); - Task.Delay(2000); //中火2s + Task.Delay(2000).Wait(); //中火2s TurnDownStatusDetect();//翻转机下降及检测 KitchenAdjustGears(1);//灶台1挡 TurnMachineGearsControl(1);//翻炒机1挡 - Task.Delay(2000); + Task.Delay(2000).Wait(); TurnMachineGearsControl(0);//关闭翻炒机 TurnUpStatusDetect();//翻转机上升及检测 TurnDownStatusDetect();//翻转机下降及检测 @@ -384,20 +384,20 @@ namespace BPASmartClient.MorkF TurnDownStatusDetect();//翻转机下降及检测 KitchenAdjustGears(3);//灶台3挡 TurnMachineGearsControl(3);//翻炒机3挡 - Task.Delay(2000);//B料断生 + Task.Delay(2000).Wait();//B料断生 KitchenAdjustGears(1);//灶台1挡 TurnMachineGearsControl(0);//关闭翻炒机 TurnUpStatusDetect();//翻转机上升及检测 TurnDownStatusDetect();//翻转机下降及检测 KitchenAdjustGears(2);//灶台3挡 TurnMachineGearsControl(3);//翻炒机3挡 - Task.Delay(2000);//煸炒入味 + Task.Delay(2000).Wait();//煸炒入味 KitchenAdjustGears(0);//灶台0挡 TurnMachineGearsControl(0);//关闭翻炒机 TurnMachineOrientControl("Top");//翻转机上升 while (!morkF.TurnMachineUpComplete) { - Task.Delay(5); + Task.Delay(5).Wait(); } EventBus.EventBus.GetInstance().Publish(new WriteModel() { Address = "M8.1", Value = false }); morkF.CookingComplete = true; //烹饪完成 @@ -427,7 +427,7 @@ namespace BPASmartClient.MorkF if (morkF.PlaceRinseTableComplete && !morkF.CleanModule) { CleanModuleControl("Start"); - Task.Delay(5000); + Task.Delay(5000).Wait(); CleanModuleControl("Stop"); } } @@ -465,7 +465,7 @@ namespace BPASmartClient.MorkF TurnMachineOrientControl("Down"); while (!morkF.TurnMachineDownComplete)//等待翻转机下降完成 { - Task.Delay(5); + Task.Delay(5).Wait(); } EventBus.EventBus.GetInstance().Publish(new WriteModel() { Address = "M8.3", Value = false });//复位 MessageLog.GetInstance.Show($"翻转机下降执行完成"); @@ -479,7 +479,7 @@ namespace BPASmartClient.MorkF morkF.AllowTakeMaterial = true; while (!morkF.TurnMachineUpComplete || !morkF.TakeMaterialComplete)//等待翻转机上升完成以及取料完成 { - Task.Delay(5); + Task.Delay(5).Wait(); } EventBus.EventBus.GetInstance().Publish(new WriteModel() { Address = "M8.1", Value = false }); MessageLog.GetInstance.Show("翻转机上升执行完成"); @@ -592,7 +592,7 @@ namespace BPASmartClient.MorkF MessageLog.GetInstance.Show("开始注油"); while (!morkF.FallOilComplete) { - Task.Delay(5); + Task.Delay(5).Wait(); } MessageLog.GetInstance.Show("注油完成"); }