diff --git a/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java b/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java index 57580c9b..93db70e9 100644 --- a/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java +++ b/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java @@ -275,16 +275,17 @@ public class ConfigName { add(new Res_PLCADDRESS("炒锅清洗", "M11.6", 0, 1)); //液体料模型 - add(new Res_PLCADDRESS("液体料", "-------------", 0, 0)); + add(new Res_PLCADDRESS("料仓校准", "-------------", 0, 0)); add(new Res_PLCADDRESS("校准时间", "VW112", 1, 1)); + add(new Res_PLCADDRESS("料仓1校准开关", "M12.3", 0, 1)); add(new Res_PLCADDRESS("料仓1校准值", "VW114", 1, 1)); + add(new Res_PLCADDRESS("料仓2校准开关", "M12.4", 0, 1)); add(new Res_PLCADDRESS("料仓2校准值", "VW116", 1, 1)); + add(new Res_PLCADDRESS("料仓3校准开关", "M12.5", 0, 1)); add(new Res_PLCADDRESS("料仓3校准值", "VW118", 1, 1)); add(new Res_PLCADDRESS("开始校正", "M12.6", 0, 1)); - add(new Res_PLCADDRESS("料仓1开关", "M12.3", 0, 1)); - add(new Res_PLCADDRESS("料仓2开关", "M12.4", 0, 1)); - add(new Res_PLCADDRESS("料仓3开关", "M12.5", 0, 1)); + add(new Res_PLCADDRESS("料仓自动", "-------------", 0, 0)); add(new Res_PLCADDRESS("料仓1需求值", "VW106", 1, 1)); add(new Res_PLCADDRESS("料仓1下料", "M11.1", 0, 1)); add(new Res_PLCADDRESS("料仓2需求值", "VW108", 1, 1)); @@ -292,9 +293,10 @@ public class ConfigName { add(new Res_PLCADDRESS("料仓3需求值", "VW110", 1, 1)); add(new Res_PLCADDRESS("料仓3下料", "M11.3", 0, 1)); - add(new Res_PLCADDRESS("料仓1开关", "M13.1", 1, 1)); - add(new Res_PLCADDRESS("料仓2开关", "M13.2", 1, 1)); - add(new Res_PLCADDRESS("料仓3开关", "M13.3", 1, 1)); + add(new Res_PLCADDRESS("料仓手动", "-------------", 0, 0)); + add(new Res_PLCADDRESS("料仓1手动开关", "M13.1", 1, 1)); + add(new Res_PLCADDRESS("料仓2手动开关", "M13.2", 1, 1)); + add(new Res_PLCADDRESS("料仓3手动开关", "M13.3", 1, 1)); //上下限 add(new Res_PLCADDRESS("位置上下限", "-------------", 0, 0)); @@ -422,16 +424,17 @@ public class ConfigName { add(new Res_PLCADDRESS("炒锅清洗", "M11.6", 0, 1)); //液体料模型 - add(new Res_PLCADDRESS("液体料", "-------------", 0, 0)); + add(new Res_PLCADDRESS("料仓校准", "-------------", 0, 0)); add(new Res_PLCADDRESS("校准时间", "VW112", 1, 1)); + add(new Res_PLCADDRESS("料仓1校准开关", "M12.3", 0, 1)); add(new Res_PLCADDRESS("料仓1校准值", "VW114", 1, 1)); + add(new Res_PLCADDRESS("料仓2校准开关", "M12.4", 0, 1)); add(new Res_PLCADDRESS("料仓2校准值", "VW116", 1, 1)); + add(new Res_PLCADDRESS("料仓3校准开关", "M12.5", 0, 1)); add(new Res_PLCADDRESS("料仓3校准值", "VW118", 1, 1)); add(new Res_PLCADDRESS("开始校正", "M12.6", 0, 1)); - add(new Res_PLCADDRESS("料仓1开关", "M12.3", 0, 1)); - add(new Res_PLCADDRESS("料仓2开关", "M12.4", 0, 1)); - add(new Res_PLCADDRESS("料仓3开关", "M12.5", 0, 1)); + add(new Res_PLCADDRESS("料仓自动", "-------------", 0, 0)); add(new Res_PLCADDRESS("料仓1需求值", "VW106", 1, 1)); add(new Res_PLCADDRESS("料仓1下料", "M11.1", 0, 1)); add(new Res_PLCADDRESS("料仓2需求值", "VW108", 1, 1)); @@ -439,9 +442,10 @@ public class ConfigName { add(new Res_PLCADDRESS("料仓3需求值", "VW110", 1, 1)); add(new Res_PLCADDRESS("料仓3下料", "M11.3", 0, 1)); - add(new Res_PLCADDRESS("料仓1开关", "M13.1", 1, 1)); - add(new Res_PLCADDRESS("料仓2开关", "M13.2", 1, 1)); - add(new Res_PLCADDRESS("料仓3开关", "M13.3", 1, 1)); + add(new Res_PLCADDRESS("料仓手动", "-------------", 0, 0)); + add(new Res_PLCADDRESS("料仓1手动开关", "M13.1", 1, 1)); + add(new Res_PLCADDRESS("料仓2手动开关", "M13.2", 1, 1)); + add(new Res_PLCADDRESS("料仓3手动开关", "M13.3", 1, 1)); //上下限 add(new Res_PLCADDRESS("位置上下限", "-------------", 0, 0)); @@ -628,16 +632,17 @@ public class ConfigName { add(new Res_PLCADDRESS("炒锅清洗", "M11.6", 0, 1)); //液体料模型 - add(new Res_PLCADDRESS("液体料", "-------------", 0, 0)); + add(new Res_PLCADDRESS("料仓校准", "-------------", 0, 0)); add(new Res_PLCADDRESS("校准时间", "VW112", 1, 1)); + add(new Res_PLCADDRESS("料仓1校准开关", "M12.3", 0, 1)); add(new Res_PLCADDRESS("料仓1校准值", "VW114", 1, 1)); + add(new Res_PLCADDRESS("料仓2校准开关", "M12.4", 0, 1)); add(new Res_PLCADDRESS("料仓2校准值", "VW116", 1, 1)); + add(new Res_PLCADDRESS("料仓3校准开关", "M12.5", 0, 1)); add(new Res_PLCADDRESS("料仓3校准值", "VW118", 1, 1)); add(new Res_PLCADDRESS("开始校正", "M12.6", 0, 1)); - add(new Res_PLCADDRESS("料仓1开关", "M12.3", 0, 1)); - add(new Res_PLCADDRESS("料仓2开关", "M12.4", 0, 1)); - add(new Res_PLCADDRESS("料仓3开关", "M12.5", 0, 1)); + add(new Res_PLCADDRESS("料仓自动", "-------------", 0, 0)); add(new Res_PLCADDRESS("料仓1需求值", "VW106", 1, 1)); add(new Res_PLCADDRESS("料仓1下料", "M11.1", 0, 1)); add(new Res_PLCADDRESS("料仓2需求值", "VW108", 1, 1)); @@ -645,9 +650,10 @@ public class ConfigName { add(new Res_PLCADDRESS("料仓3需求值", "VW110", 1, 1)); add(new Res_PLCADDRESS("料仓3下料", "M11.3", 0, 1)); - add(new Res_PLCADDRESS("料仓1开关", "M13.1", 1, 1)); - add(new Res_PLCADDRESS("料仓2开关", "M13.2", 1, 1)); - add(new Res_PLCADDRESS("料仓3开关", "M13.3", 1, 1)); + add(new Res_PLCADDRESS("料仓手动", "-------------", 0, 0)); + add(new Res_PLCADDRESS("料仓1手动开关", "M13.1", 1, 1)); + add(new Res_PLCADDRESS("料仓2手动开关", "M13.2", 1, 1)); + add(new Res_PLCADDRESS("料仓3手动开关", "M13.3", 1, 1)); //上下限 add(new Res_PLCADDRESS("位置上下限", "-------------", 0, 0)); diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/adapter/lc_adapter.java b/app/src/main/java/com/bonait/bnframework/modules/home/adapter/lc_adapter.java index b5627c4c..b39d26ef 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/adapter/lc_adapter.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/adapter/lc_adapter.java @@ -89,7 +89,7 @@ public class lc_adapter extends RecyclerView.Adapter { myViewHolder.imageView.setTag(finalKg); myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_g)); - ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"开关", true, null); + ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", true, null); ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); }else { @@ -97,7 +97,7 @@ public class lc_adapter extends RecyclerView.Adapter { myViewHolder.imageView.setTag(finalKg); myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_k2)); - ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"开关", false, null); + ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", false, null); ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); } dialog.dismiss(); @@ -106,7 +106,6 @@ public class lc_adapter extends RecyclerView.Adapter { } }); - myViewHolder.name.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { @@ -130,7 +129,7 @@ public class lc_adapter extends RecyclerView.Adapter { myViewHolder.imageView.setTag(finalKg); myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_g)); - ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"开关", true, null); + ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", true, null); ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); }else { @@ -138,7 +137,7 @@ public class lc_adapter extends RecyclerView.Adapter { myViewHolder.imageView.setTag(finalKg); myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_k2)); - ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"开关", false, null); + ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", false, null); ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); } dialog.dismiss(); @@ -146,6 +145,47 @@ public class lc_adapter extends RecyclerView.Adapter { }); } }); + + myViewHolder.imageView.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + String kg= myViewHolder.imageView.getTag().toString(); + if(kg.equals("关闭")) + { + kg="打开"; + }else + { + kg="关闭"; + } + String title = "料仓操作提示!"; + String message = "请问客官确定要将["+lcModes.get(position).materialName+"]"+kg+"?"; + String finalKg = kg; + AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { + @Override + public void onClick(QMUIDialog dialog, int index) { + if(finalKg.equals("打开")) + { + //打开 + myViewHolder.imageView.setTag(finalKg); + myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_g)); + + ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", true, null); + ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); + }else + { + //关闭 + myViewHolder.imageView.setTag(finalKg); + myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_k2)); + + ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", false, null); + ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); + } + dialog.dismiss(); + } + }); + } + }); + //myViewHolder.bfb.setText(bfb+"%"); // myViewHolder.add.setOnClickListener(new View.OnClickListener() { // @Override diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java index 3d37baaa..66e345d6 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java @@ -100,12 +100,6 @@ public class Home1Fragment extends BaseFragment { imagebutton_control choushui_control;//抽水 @BindView(R.id.fangshui_control) imagebutton_control fangshui_control;//防水 - @BindView(R.id.jiaoban_control) - imagebutton_control jiaoban_control;//搅拌 - @BindView(R.id.zhuandong_control_left) - imagebutton_control zhuandong_control_left;//左转 - @BindView(R.id.zhuandong_control_Rift) - imagebutton_control zhuandong_control_Rift;//右转 @BindView(R.id.chaoguo_wendu) QMUILinkTextView chaoguo_wendu;// @BindView(R.id.chaoguo_weizhi) diff --git a/app/src/main/res/layout/fragment_home1.xml b/app/src/main/res/layout/fragment_home1.xml index cd15f83d..06663d8c 100644 --- a/app/src/main/res/layout/fragment_home1.xml +++ b/app/src/main/res/layout/fragment_home1.xml @@ -225,16 +225,6 @@ android:orientation="vertical"> android:layout_width="190dp" android:layout_height="match_parent" android:layout_marginRight="@dimen/dp_10"> - android:stepSize="1" app:thumbWithinTrackBounds="true" app:enableDrawHalo="false"/> - - android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginRight="@dimen/dp_10"> - -