Ver código fonte

3333

一拖四味魔方
fyf 1 ano atrás
pai
commit
bb9ced6601
2 arquivos alterados com 24 adições e 14 exclusões
  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 Ver arquivo

@@ -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 Ver arquivo

@@ -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://一键加满


Carregando…
Cancelar
Salvar