From 2f954b786b80fde1ed0ccb9d7de8e2ac27251cce Mon Sep 17 00:00:00 2001 From: fyf Date: Wed, 21 Feb 2024 16:16:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E7=A7=BB=E8=BD=B4=E5=8E=BB=E4=B8=80?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activity/BottomNavigationNewActivity.java | 22 ++++++++++++++---- .../modules/home/fragment/Home1Fragment.java | 23 +++++++++++++++---- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationNewActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationNewActivity.java index 1d75bb98..f9616f46 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationNewActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationNewActivity.java @@ -534,13 +534,27 @@ public class BottomNavigationNewActivity extends BaseActivity { ExecuteTheRecipe.BottomClick("平移-去" + writeValue); Log.d("移动去", writeValue); } else { - ExecuteTheRecipe.BottomClick("平移-去1号位"); - Log.d("移动去", "1号位"); + Object val1= ExecuteTheRecipe.ReadPLC("平移轴在1号位"); + if(val1!=null) + { + if(!(boolean) (val1)) //平移轴不在在一号位 + { + ExecuteTheRecipe.BottomClick1("平移-去1号位"); + Log.d("移动去", "1号位"); + } + } } } else { if (!MakeCipe.processname.equals("主料")) { - ExecuteTheRecipe.BottomClick("平移-去1号位"); - Log.d("移动去", "1号位"); + Object val1= ExecuteTheRecipe.ReadPLC("平移轴在1号位"); + if(val1!=null) + { + if(!(boolean) (val1)) //平移轴不在在一号位 + { + ExecuteTheRecipe.BottomClick1("平移-去1号位"); + Log.d("移动去", "1号位"); + } + } } } } diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java index 08a88c70..dfc59153 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java @@ -742,16 +742,31 @@ public class Home1Fragment extends BaseFragment { writeValue = value; } } + ExecuteTheRecipe.BottomClick1("平移-去" + writeValue); Log.d("移动去", writeValue); } else { - ExecuteTheRecipe.BottomClick1("平移-去1号位"); - Log.d("移动去", "1号位"); + Object val1= ExecuteTheRecipe.ReadPLC("平移轴在1号位"); + if(val1!=null) + { + if(!(boolean) (val1)) //平移轴不在在一号位 + { + ExecuteTheRecipe.BottomClick1("平移-去1号位"); + Log.d("移动去", "1号位"); + } + } } } else { if (!MakeCipe.processname.equals("主料")) { - ExecuteTheRecipe.BottomClick1("平移-去1号位"); - Log.d("移动去", "1号位"); + Object val1= ExecuteTheRecipe.ReadPLC("平移轴在1号位"); + if(val1!=null) + { + if(!(boolean) (val1)) //平移轴不在在一号位 + { + ExecuteTheRecipe.BottomClick1("平移-去1号位"); + Log.d("移动去", "1号位"); + } + } } } }