Kaynağa Gözat

更新PLC地址配置

tags/old_version_1
fyf 1 yıl önce
ebeveyn
işleme
d849d5167f
5 değiştirilmiş dosya ile 84 ekleme ve 84 silme
  1. +27
    -21
      app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java
  2. +45
    -5
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/lc_adapter.java
  3. +0
    -6
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java
  4. +11
    -52
      app/src/main/res/layout/fragment_home1.xml
  5. +1
    -0
      app/src/main/res/layout/item/layout/item_liaochang.xml

+ 27
- 21
app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java Dosyayı Görüntüle

@@ -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));


+ 45
- 5
app/src/main/java/com/bonait/bnframework/modules/home/adapter/lc_adapter.java Dosyayı Görüntüle

@@ -89,7 +89,7 @@ public class lc_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
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<RecyclerView.ViewHolder> {
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<RecyclerView.ViewHolder> {
}
});


myViewHolder.name.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@@ -130,7 +129,7 @@ public class lc_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
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<RecyclerView.ViewHolder> {
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<RecyclerView.ViewHolder> {
});
}
});

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


+ 0
- 6
app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java Dosyayı Görüntüle

@@ -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)


+ 11
- 52
app/src/main/res/layout/fragment_home1.xml Dosyayı Görüntüle

@@ -225,16 +225,6 @@ android:orientation="vertical">
android:layout_width="190dp"
android:layout_height="match_parent"
android:layout_marginRight="@dimen/dp_10">
<com.bonait.bnframework.modules.home.fragment.mode.imagebutton_control
android:id="@+id/jiaoban_control"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:tag=""
app:imagesrc_ks="@mipmap/ks_jb"
app:imagesrc_tz="@mipmap/tz_jb"
/>
<com.suke.widget.SwitchButton
app:sb_uncheck_color="@color/app_color_blue"
app:sb_uncheckcircle_color="@color/app_color_blue"
@@ -304,8 +294,6 @@ android:orientation="vertical">
android:stepSize="1"
app:thumbWithinTrackBounds="true"
app:enableDrawHalo="false"/>


</RelativeLayout>

<LinearLayout
@@ -317,18 +305,6 @@ android:orientation="vertical">
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="@dimen/dp_10">
<com.bonait.bnframework.modules.home.fragment.mode.imagebutton_control
android:id="@+id/zhuandong_control_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:visibility="gone"

android:tag=""
app:imagesrc_ks="@mipmap/ks_zz"
app:imagesrc_tz="@mipmap/tz_zz"
>
</com.bonait.bnframework.modules.home.fragment.mode.imagebutton_control>
<Button
android:id="@+id/btn_zhuandong_control_left"
android:layout_width="80dp"
@@ -360,17 +336,6 @@ android:orientation="vertical">
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="@dimen/dp_10">
<com.bonait.bnframework.modules.home.fragment.mode.imagebutton_control
android:id="@+id/zhuandong_control_Rift"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:tag=""
android:visibility="gone"

app:imagesrc_ks="@mipmap/ks_fz"
app:imagesrc_tz="@mipmap/tz_fz">
</com.bonait.bnframework.modules.home.fragment.mode.imagebutton_control>
<Button
android:id="@+id/btn_zhuandong_control_Rift"
android:layout_width="80dp"
@@ -590,30 +555,24 @@ android:orientation="vertical">
android:layout_height="match_parent"
android:layout_marginRight="@dimen/dp_10">
<LinearLayout
android:id="@+id/qdjb"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<RelativeLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="10dp"
android:layout_width="wrap_content"
android:layout_height="match_parent">

<ImageView
android:layout_width="40dp"
android:layout_height="wrap_content"
<Button
android:id="@+id/qdjb"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_marginBottom="10dp"
android:layout_centerInParent="true"
android:src="@mipmap/zidongqingxi" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="自动清洗"
android:textSize="19dp"/>
android:background="@drawable/bg_btn_login_selected"
android:text="清洗"
android:textColor="@color/white"
android:textSize="16dp"/>
</RelativeLayout>

</LinearLayout>
</LinearLayout>
</RelativeLayout>


+ 1
- 0
app/src/main/res/layout/item/layout/item_liaochang.xml Dosyayı Görüntüle

@@ -21,6 +21,7 @@
android:background="@drawable/hr_bj">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:id="@+id/type"
android:focusable="false"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"


Yükleniyor…
İptal
Kaydet