Browse Source

解决场景进入问题

master
itachilee 2 years ago
parent
commit
9576d195ad
2 changed files with 9 additions and 3 deletions
  1. +1
    -1
      HBLConsole.Communication/LebaiHelper.cs
  2. +8
    -2
      HBLConsole.MORKIC/Control_MORKIC.cs

+ 1
- 1
HBLConsole.Communication/LebaiHelper.cs View File

@@ -148,7 +148,7 @@ namespace HBLConsole.Communication
if (robotData == null || client == null) return;
client?.RunScene(id);
TaskInfo res = client.GetTask(id).Result;
while (res.Status != Lebai.SDK.Dtos.TaskStatus.Running)
while (res.Status != Lebai.SDK.Dtos.TaskStatus.RunSuccess)
{
client?.RunScene(id);
res = client.GetTask(id).Result;


+ 8
- 2
HBLConsole.MORKIC/Control_MORKIC.cs View File

@@ -315,6 +315,7 @@ namespace HBLConsole.MORKIC
//while (!ChipStatus.GetInstance().CompletedTake_CPU_CUP_COFFEE) { Thread.Sleep(5); }
MessageLog.GetInstance.Show("咖啡杯取杯完成");
LebaiHelper.GetInstance.SetValue(100);
Thread.Sleep(1500);
//咖啡杯检测场景
while (!ChipStatus.GetInstance().ArticleExits)
{
@@ -330,8 +331,10 @@ namespace HBLConsole.MORKIC
Thread.Sleep(500);
}
LebaiHelper.GetInstance.Scene(LebaiHelper.SENCE_咖啡杯检测);
//场景需要两次才能进去
Thread.Sleep(2000);
if(lebai.Value != 2)
LebaiHelper.GetInstance.Scene(LebaiHelper.SENCE_咖啡杯检测);
while (!(lebai.Ok && lebai.Value == 2))
{
Thread.Sleep(5);
@@ -355,6 +358,7 @@ namespace HBLConsole.MORKIC
//are.WaitOne(1 * 180);
MessageLog.GetInstance.Show("咖啡机制作咖啡完成");
LebaiHelper.GetInstance.SetValue(101);
Thread.Sleep(2000);
//LebaiHelper.GetInstance.Scene(LebaiHelper.SENCE_送咖啡);
//while (!(lebai.Ok && lebai.Value == 5))
//{
@@ -362,6 +366,7 @@ namespace HBLConsole.MORKIC
//}
//MessageLog.GetInstance.Show("机器人到达顾客取咖啡位置");
LebaiHelper.GetInstance.Scene(LebaiHelper.SENCE_New送咖啡);
Thread.Sleep(500);
while (!(lebai.Ok && lebai.Value == 5))
{
Thread.Sleep(5);
@@ -443,6 +448,7 @@ namespace HBLConsole.MORKIC
{
Thread.Sleep(5);
}
MessageLog.GetInstance.Show("冰淇凌制作完成");
SimpleFactory.GetInstance.OrderChanged(subOrderId, BPA.Message.Enum.ORDER_STATUS.COMPLETED_COOK);
}



Loading…
Cancel
Save