|
|
@@ -107,6 +107,9 @@ namespace HBLConsole.MORKIC |
|
|
|
{ |
|
|
|
if (morkOrderPushes.TryDequeue(out MorkOrderPush order)) |
|
|
|
{ |
|
|
|
//Thread.Sleep(5000); |
|
|
|
//SimpleFactory.GetInstance.OrderChanged(subOrderId, BPA.Message.Enum.ORDER_STATUS.COMPLETED_COOK); |
|
|
|
|
|
|
|
//商品类型 |
|
|
|
GOODS_TYPE currentGoodsType = GOODS_TYPE.NEITHER; |
|
|
|
//子订单ID |
|
|
@@ -183,8 +186,17 @@ namespace HBLConsole.MORKIC |
|
|
|
//订单状态改变:开始制作 |
|
|
|
SimpleFactory.GetInstance.OrderChanged(subOrderId, BPA.Message.Enum.ORDER_STATUS.COOKING); |
|
|
|
//todo:先调用机器人 |
|
|
|
|
|
|
|
|
|
|
|
ThreadOperate.GetInstance.Start(new Action(() => { LebaiHelper.GetInstance.Scene(10002); }), "调用乐百机器人做咖啡场景"); |
|
|
|
while (!(lebai.Ok && lebai.Value == 1)) |
|
|
|
{ |
|
|
|
Thread.Sleep(5); |
|
|
|
} |
|
|
|
//todo:咖啡杯下杯 |
|
|
|
MessageLog.GetInstance.Show("咖啡杯取杯完成"); |
|
|
|
LebaiHelper.GetInstance.SetValue(100); |
|
|
|
|
|
|
|
|
|
|
|
while (!(lebai.Ok && lebai.Value == 2)) |
|
|
|
{ |
|
|
@@ -192,9 +204,14 @@ namespace HBLConsole.MORKIC |
|
|
|
} |
|
|
|
MessageLog.GetInstance.Show("机器人到达接咖啡口位置"); |
|
|
|
new MakeCoffeeEvent() { DrinkCode = (DrCoffeeDrinksCode)int.Parse(mainMaterialLoc) }.Publish(); |
|
|
|
are.WaitOne(1000 * 90); |
|
|
|
are.WaitOne(1000 * 180); |
|
|
|
MessageLog.GetInstance.Show("咖啡机制作咖啡完成"); |
|
|
|
LebaiHelper.GetInstance.SetValue(101); |
|
|
|
while (!(lebai.Ok && lebai.Value == 3)) |
|
|
|
{ |
|
|
|
Thread.Sleep(5); |
|
|
|
} |
|
|
|
MessageLog.GetInstance.Show("机器人到达接咖啡口位置"); |
|
|
|
//订单状态改变:完成 |
|
|
|
SimpleFactory.GetInstance.OrderChanged(subOrderId, BPA.Message.Enum.ORDER_STATUS.COMPLETED_COOK); |
|
|
|
} |
|
|
@@ -245,11 +262,15 @@ namespace HBLConsole.MORKIC |
|
|
|
//开始心跳刷新,根据咖啡机及冰淇淋机来判断 |
|
|
|
ThreadOperate.GetInstance.StartLong(new Action(() => |
|
|
|
{ |
|
|
|
|
|
|
|
//GeneralConfig.Healthy = true; |
|
|
|
//GeneralConfig.Healthy = |
|
|
|
// LebaiHelper.GetInstance.IsConnected && |
|
|
|
// MorkIStatus.GetInstance().CanDo && |
|
|
|
// MorkCStatus.GetInstance().CanDo; |
|
|
|
GeneralConfig.Healthy = |
|
|
|
LebaiHelper.GetInstance.IsConnected && |
|
|
|
MorkIStatus.GetInstance().CanDo && |
|
|
|
MorkCStatus.GetInstance().CanDo; |
|
|
|
LebaiHelper.GetInstance.IsConnected && |
|
|
|
MorkCStatus.GetInstance().CanDo; |
|
|
|
Thread.Sleep(100); |
|
|
|
}), "MORK-IC心跳刷新"); |
|
|
|
|
|
|
|