Browse Source

3333

一拖四味魔方
fyf 11 months ago
parent
commit
bb9ced6601
2 changed files with 24 additions and 14 deletions
  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 View File

@@ -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 View File

@@ -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…
Cancel
Save