|
|
@@ -9,6 +9,7 @@ import androidx.recyclerview.widget.RecyclerView; |
|
|
|
import androidx.viewpager.widget.ViewPager; |
|
|
|
|
|
|
|
import android.content.Context; |
|
|
|
import android.media.MediaPlayer; |
|
|
|
import android.os.Bundle; |
|
|
|
import android.os.Handler; |
|
|
|
import android.os.Message; |
|
|
@@ -82,6 +83,7 @@ public class JiaoYan_zdqx_fragment extends BaseFragment { |
|
|
|
break; |
|
|
|
case R.id.bt_start://开始清洗 |
|
|
|
|
|
|
|
|
|
|
|
if (DataBus.getInstance().ZDQX_IsStart) { |
|
|
|
|
|
|
|
String title = "温馨提示!"; |
|
|
@@ -93,6 +95,7 @@ public class JiaoYan_zdqx_fragment extends BaseFragment { |
|
|
|
getActivity().runOnUiThread(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
Speak(R.raw.qxksqsh); |
|
|
|
ExecuteTheRecipe.WritePLC("清洗模式", false,null); |
|
|
|
ExecuteTheRecipe.WritePLC("自动清洗开始", false,null); |
|
|
|
DataBus.getInstance().ZDQX_IsStart=false; |
|
|
@@ -132,7 +135,13 @@ public class JiaoYan_zdqx_fragment extends BaseFragment { |
|
|
|
{ |
|
|
|
ExecuteTheRecipe.WritePLC("管道自动排水完成",false,null); |
|
|
|
ExecuteTheRecipe.WritePLC("管道自动排水",true,null); |
|
|
|
|
|
|
|
getActivity().runOnUiThread(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
ToastUtils.warning("管道自动排水中,请稍后..."); |
|
|
|
bt_start.setText("管道排水中"); |
|
|
|
} |
|
|
|
}); |
|
|
|
final boolean[] IsStopPS = {false}; |
|
|
|
while (DataBus.getInstance().ZDQX_IsStart && !IsStopPS[0]) |
|
|
|
{ |
|
|
@@ -143,7 +152,12 @@ public class JiaoYan_zdqx_fragment extends BaseFragment { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getActivity().runOnUiThread(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
bt_start.setText("正在清洗"); |
|
|
|
} |
|
|
|
}); |
|
|
|
for (BPA_SUGAR item: |
|
|
|
DataBus.getInstance().zdqx) { |
|
|
|
ExecuteTheRecipe.WritePLC("自动清洗完成",false,null); |
|
|
@@ -174,6 +188,13 @@ public class JiaoYan_zdqx_fragment extends BaseFragment { |
|
|
|
ExecuteTheRecipe.WritePLC("管道自动排水完成",false,null); |
|
|
|
ExecuteTheRecipe.WritePLC("管道自动排水",true,null); |
|
|
|
|
|
|
|
getActivity().runOnUiThread(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
ToastUtils.warning("管道自动排水中,请稍后..."); |
|
|
|
bt_start.setText("管道排水中"); |
|
|
|
} |
|
|
|
}); |
|
|
|
IsStopPS[0] =false; |
|
|
|
while (DataBus.getInstance().ZDQX_IsStart && !IsStopPS[0]) |
|
|
|
{ |
|
|
@@ -199,6 +220,8 @@ public class JiaoYan_zdqx_fragment extends BaseFragment { |
|
|
|
DataBus.getInstance().zdqxchidAdapter.refresh(); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
Speak(R.raw.qxwc); |
|
|
|
} |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|