Browse Source

1.增加一拖二一拖四 强制结束任务

2.调整投料位置和炒制位置的默认
燃气自翻炒锅
fyf 1 year ago
parent
commit
023916a8b6
4 changed files with 41 additions and 1 deletions
  1. +31
    -0
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
  2. +2
    -1
      app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java
  3. +4
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationNewActivity.java
  4. +4
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java

+ 31
- 0
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java View File

@@ -634,6 +634,10 @@ public class ExecuteTheRecipe {
}
}

//默认去炒制位置1去等待
BPA_GOODSRECIPE data3 = Get位置("高速", "炒菜位1");
ExecuteOperationSteps(data3.processname, data3.processvalue);

//判断是否有烹饪时间
int val = 0;
for (HashMap.Entry<String, String> entry : data.entrySet()) {
@@ -1018,6 +1022,10 @@ public class ExecuteTheRecipe {
WriteMainPLC("炒锅投主料完成", true, null);
}

//默认去炒制位置1去等待
BPA_GOODSRECIPE data3 = Get位置("高速", "炒菜位1");
ExecuteOperationSteps(data3.processname, data3.processvalue);

//判断是否有烹饪时间
int val = 0;
for (HashMap.Entry<String, String> entry : data.entrySet()) {
@@ -1155,6 +1163,10 @@ public class ExecuteTheRecipe {
WriteMainPLC("炒锅投主料完成", true, null);
}

//默认去炒制位置1去等待
BPA_GOODSRECIPE data3 = Get位置("高速", "炒菜位1");
ExecuteOperationSteps(data3.processname, data3.processvalue);

//判断是否有烹饪时间
int val = 0;
for (HashMap.Entry<String, String> entry : data.entrySet()) {
@@ -1224,6 +1236,10 @@ public class ExecuteTheRecipe {
ExecuteTheRecipe.WritePLC("加热", true, null);
}//再次释放加热

//默认去炒制位置1去等待
BPA_GOODSRECIPE data3 = Get位置("高速", "炒菜位1");
ExecuteOperationSteps(data3.processname, data3.processvalue);

if (val > 0) {
Thread.sleep(val * 1000);
}
@@ -1846,6 +1862,21 @@ public class ExecuteTheRecipe {
}
}

//机器人急停,制作订单 应该暂停

//强制结束任务
Object IsStop = ReadMainPLC("强制结束任务");
if (IsStop != null) {
if ((boolean) IsStop)
{
WriteMainPLC("强制结束任务", false, null);//复位

ExecuteTheRecipe.IsPause = false;
ExecuteTheRecipe.WritePLC("暂停开关", false, null);
ExecuteTheRecipe.SetForcedEnd();//设置强制结束
}
}

// Object IsJT = ReadMainPLC("机器人急停");
// if (IsJT != null) {
// if ((boolean) IsJT)//异常情况


+ 2
- 1
app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java View File

@@ -1130,7 +1130,7 @@ public class ConfigName {
put("炒菜完成请求出餐",8);
put("炒锅出餐减速到位",9); //实时
put("炒锅请求投主料",10);
put("强制结束任务完成",11);//炒锅反馈强制结束任务完成

put("机器人准备就绪",51);//修改就绪信号
put("机器人放辅料完成",52);
@@ -1138,6 +1138,7 @@ public class ConfigName {
put("商品下发",54);
put("机器人急停",55);//true 异常 false 正常
put("机器人投放主料完成",56);
put("强制结束任务",57);

put("商品信息",0);
}};


+ 4
- 0
app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationNewActivity.java View File

@@ -415,6 +415,10 @@ public class BottomNavigationNewActivity extends BaseActivity {
ToastUtils.info("客官,当前菜品已强制结束!!!");
//初始化
ExecuteTheRecipe.BottomClick("初始化");
if (ConfigName.getInstance().versionSelectionEnum.contains("一拖"))//通知任务结束
{
ExecuteTheRecipe.WriteMainPLC("强制结束任务完成", true, null);//复位
}
}
}
});


+ 4
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java View File

@@ -623,6 +623,10 @@ public class Home1Fragment extends BaseFragment {
ToastUtils.info("客官,当前菜品已强制结束!!!");
//初始化
ExecuteTheRecipe.BottomClick("初始化");
if (ConfigName.getInstance().versionSelectionEnum.contains("一拖"))//通知任务结束
{
ExecuteTheRecipe.WriteMainPLC("强制结束任务完成", true, null);//复位
}
}
}
});


Loading…
Cancel
Save