瀏覽代碼

3333

一拖四味魔方
fyf 1 年之前
父節點
當前提交
bb9ced6601
共有 2 個檔案被更改,包括 24 行新增14 行删除
  1. +11
    -4
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/wdsz_adapter.java
  2. +13
    -10
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_yijian_controlextends.java

+ 11
- 4
app/src/main/java/com/bonait/bnframework/modules/home/adapter/wdsz_adapter.java 查看文件

@@ -115,12 +115,19 @@ public class wdsz_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>

}
};
ExecuteTheRecipe.TempComplete=new IRun() {
new Thread(new Runnable() {
@Override
public void Run() {
mHandler.sendEmptyMessage(0);
public void run() {
while (true) {
try {
mHandler.sendEmptyMessage(0);
Thread.sleep(200);
} catch (Exception ex) {
ToastUtils.error("异常信息:" + ex.getMessage());
}
}
}
};
}).start();

//
myViewHolder.control_switch_bs.setOnCheckedChangeListener(new SwitchButton.OnCheckedChangeListener() {


+ 13
- 10
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_yijian_controlextends.java 查看文件

@@ -287,16 +287,19 @@ public class add_yijian_controlextends extends LinearLayout {
ExecuteTheRecipe.WritePLC("手自切换", false, null);
for (BPA_SILOS item:siloslist)
{
int time=item.bValue<=0?5:item.bValue;//默认5秒
ExecuteTheRecipe.WritePLC("手动控制"+item.num,true,null);
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
ExecuteTheRecipe.WritePLC("手动控制"+item.num,false,null);
mHandler.sendEmptyMessage(0);
i++;
}
}, time * 1000);
if(!item.name.equals("果糖仓") && !item.name.equals("粉料仓") )
{
int time=item.bValue<=0?5:item.bValue;//默认5秒
ExecuteTheRecipe.WritePLC("手动控制"+item.num,true,null);
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
ExecuteTheRecipe.WritePLC("手动控制"+item.num,false,null);
mHandler.sendEmptyMessage(0);
i++;
}
}, time * 1000);
}
}
break;
case 2://一键加满


Loading…
取消
儲存