diff --git a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java index 6d433994..f654ebe8 100644 --- a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java +++ b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java @@ -416,26 +416,6 @@ public class ExecuteTheRecipe { IsComplete[0] = s; }); -// Activity activity = findActivity(context); -// if (activity != null) { -// activity.runOnUiThread(new Runnable() { -// @Override -// public void run() { -// try { -// new QMUIDialog.MessageDialogBuilder(context).setCancelable(false).setCanceledOnTouchOutside(false).setTitle(title).setMessage(message).addAction("确定", new QMUIDialogAction.ActionListener() { -// @Override -// public void onClick(QMUIDialog dialog, int index) { -// IsComplete[0] = true; -// dialog.dismiss(); -// } -// }).create(com.qmuiteam.qmui.R.style.QMUI_Dialog).show(); -// } catch (Exception e) { -// -// } -// } -// }); -// } - while (!IsComplete[0]) { Thread.sleep(100);//10 *6 } @@ -553,13 +533,6 @@ public class ExecuteTheRecipe { HeatStatus=s?1:2; }); - //确认点火提示 -// mainActivity.runOnUiThread(()->{ -// AlertDialogUtils.showDialog(mainContext, "提示", "是否开始点火?",(s)->{ -// HeatStatus=s?1:2; -// }); -// }); - //等待弹框关闭 WaitDialog((s)->{ if(s){ @@ -572,41 +545,9 @@ public class ExecuteTheRecipe { while(!IsForcedEnd){ if(getDeviceData.IgnitionError){ MessageLog.ShowInfo("点火失败,请求重试"); -// mainActivity.runOnUiThread(new Runnable() { -// @Override -// public void run() { -// AlertDialogUtils.showDialog(mainContext, "提示", "点火失败,是否复位后重试?", new IDialogAction() { -// @Override -// public void Confirm() { -// MessageLog.ShowInfo("确认重新点火"); -// WriteAsync("点火手自动切换开关", false);//设置自动点火模式 -// WriteAsync("点火启动开关", false);//关闭点火 -// BottomClick("点火复位开关");//复位点火开关 -// WriteAsync("点火启动开关", true);//重新点火 -// } -// @Override -// public void Cancel() { -// IsForcedEnd=true; -// MessageLog.ShowInfo("点火失败,取消继续点火,强制结束任务"); -// } -// -// @Override -// public void ExitDialog(boolean status) { -// -// } -// }); -// } -// }); - //点火失败提示 DialogManager.showError("点火失败,是否复位后重试?",AlertDialogButton.YesNo,s->{HeatStatus=s?1:2; }); -// mainActivity.runOnUiThread(()->{ -// AlertDialogUtils.showDialog(mainContext, "提示", "点火失败,是否复位后重试?",(s)->{ -// HeatStatus=s?1:2; -// }); -// }); - //等待弹框被关闭 WaitDialog((s)->{ if(s){ @@ -660,23 +601,6 @@ public class ExecuteTheRecipe { */ private static void Write_PLC_ConstraintCondition(HashMap data) { try { -// int time = 0; -// float temp = 0; -// float val = 0; -// for (HashMap.Entry entry : data.entrySet()) { -// String key = entry.getKey(); -// String value = entry.getValue(); -// if (key.contains("(秒)")) { -// time = Integer.parseInt(value); -// } -// if (key.contains("锅内重量")) { -// val = Float.parseFloat(value); -// } -// if (key.contains("温度设定")) { -// temp = Float.parseFloat(value); -// } -// } - for (HashMap.Entry entry : data.entrySet()) { String key = entry.getKey(); String value = entry.getValue(); @@ -712,31 +636,6 @@ public class ExecuteTheRecipe { } } - //1.判断等待时长是否满足 -// if (time > 0 && !IsForcedEnd) { -// MessageLog.ShowInfo("等待时间:"+time+" 秒"); -// ThreadDelay(time); -// if(IsForcedEnd) MessageLog.ShowInfo("等待时间:强制结束"); -// else MessageLog.ShowInfo("等待时间完成"); -// } - - - //2.判断温度是否满足 -// if (temp > 0 && !IsForcedEnd) { -// MessageLog.ShowInfo("等待温度:"+temp+" ℃"); -// ThreadWhile("炒锅当前温度", temp); -// if(IsForcedEnd) MessageLog.ShowInfo("等待温度:强制结束"); -// else MessageLog.ShowInfo("等待温度完成"); -// } - - //3.判断重量是否到达 -// if (val > 0 && !IsForcedEnd) { -// MessageLog.ShowInfo("等待重量:"+val+"KG"); -// ThreadWhile("炒锅当前重量", val); -// if(IsForcedEnd) MessageLog.ShowInfo("等待重量:强制结束"); -// else MessageLog.ShowInfo("等待重量完成"); -// } - } catch (Exception ex) { // ToastUtils.error("异常信息:" + ex.getMessage()); MessageLog.ShowError(ex.getMessage());