Explorar el Código

清洗调整

调味吧台
pry hace 6 meses
padre
commit
7a6dd3d298
Se han modificado 1 ficheros con 11 adiciones y 21 borrados
  1. +11
    -21
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_silos_ck_edit.java

+ 11
- 21
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_silos_ck_edit.java Ver fichero

@@ -329,29 +329,19 @@ public class add_silos_ck_edit extends LinearLayout {
} }
} }
}); });
control_switch_shoudong.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
String name = lcMode.name + lcMode.num+"启停控制";
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
Log.e("鼠标", "按下: ");
ExecuteTheRecipe.WritePLC("清洗模式", true, new IWriteCallBack() {
@Override
public void onSuccess() {
ExecuteTheRecipe.WritePLC(name, true, null);
}


@Override
public void onFailure(String ErrorMsg) {
}
});
} else if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
Log.e("鼠标", "松开: ");
ExecuteTheRecipe.WritePLC("清洗模式", false, null);
ExecuteTheRecipe.WritePLC(name, false, null);
}
return false;
control_switch_shoudong.setOnTouchListener((view,motionEvent)->{
String name = lcMode.name + lcMode.num+"启停控制";
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
Log.e("鼠标", "按下: ");
ExecuteTheRecipe.WritePLC("清洗模式", true,null);
ExecuteTheRecipe.WritePLC(name, true, null);
} else if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
Log.e("鼠标", "松开: ");
ExecuteTheRecipe.WritePLC("清洗模式", false,null);
ExecuteTheRecipe.WritePLC(name, false, null);
} }
return false;
}); });


// control_switch_shoudong.setOnTouchListener(new OnTouchListener() { // control_switch_shoudong.setOnTouchListener(new OnTouchListener() {


Cargando…
Cancelar
Guardar