Pārlūkot izejas kodu

3333

一拖四味魔方
fyf pirms 1 gada
vecāks
revīzija
bb9ced6601
2 mainītis faili ar 24 papildinājumiem un 14 dzēšanām
  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 Parādīt failu

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


} }
}; };
ExecuteTheRecipe.TempComplete=new IRun() {
new Thread(new Runnable() {
@Override @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() { 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 Parādīt failu

@@ -287,16 +287,19 @@ public class add_yijian_controlextends extends LinearLayout {
ExecuteTheRecipe.WritePLC("手自切换", false, null); ExecuteTheRecipe.WritePLC("手自切换", false, null);
for (BPA_SILOS item:siloslist) 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; break;
case 2://一键加满 case 2://一键加满


Notiek ielāde…
Atcelt
Saglabāt