diff --git a/app/src/main/java/com/bonait/bnframework/business/ConfigData.java b/app/src/main/java/com/bonait/bnframework/business/ConfigData.java index edbc7a47..a4fa2c2b 100644 --- a/app/src/main/java/com/bonait/bnframework/business/ConfigData.java +++ b/app/src/main/java/com/bonait/bnframework/business/ConfigData.java @@ -997,6 +997,7 @@ public class ConfigData { } + //endregion } 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 61c274ef..104bee13 100644 --- a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java +++ b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java @@ -296,7 +296,7 @@ public class ExecuteTheRecipe { } catch (Exception ex) { ToastUtils.error("PLC设备数据监听异常:" + ex.getMessage()); } - Thread.sleep(1); + Thread.sleep(50); } @Override @@ -510,6 +510,12 @@ public class ExecuteTheRecipe { } }); } + + public static void releaseListening(){ + ThreadManager.Get().Stop("PLC设备数据监听"); + ThreadManager.Get().Stop("PLC设备数据监听-信号检测"); + ThreadManager.Get().Stop("商品制作线程"); + } //endregion //region PLC基础控制类 diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java index 14f5855e..a6db02ee 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java @@ -20,6 +20,7 @@ import android.widget.RelativeLayout; import com.bonait.bnframework.R; import com.bonait.bnframework.business.ConfigData; +import com.bonait.bnframework.business.ExecuteTheRecipe; import com.bonait.bnframework.business.OrderServer; import com.bonait.bnframework.common.base.BaseActivity; import com.bonait.bnframework.common.constant.ConfigName; @@ -140,6 +141,9 @@ public class BottomNavigationMainActivity extends BaseActivity{ ConfigData.getInstance().ColsePLC(); MediaPlayerHelper.getInstance().Release(); MQTT.get().ConnMqttBroken(false);//释放mqtt + ThreadManager.Get().Stop("PLC断线重连线程"); + ThreadManager.Get().Stop("心跳服务"); + ExecuteTheRecipe.releaseListening(); super.onDestroy(); Glide.get(this).clearMemory(); diff --git a/app/src/main/res/layout/fragment_make_good.xml b/app/src/main/res/layout/fragment_make_good.xml index dd1115fd..5aa8614a 100644 --- a/app/src/main/res/layout/fragment_make_good.xml +++ b/app/src/main/res/layout/fragment_make_good.xml @@ -18,7 +18,7 @@ android:layout_weight="1" android:orientation="horizontal"> + android:layout_height="100dp">