diff --git a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java index 7561a290..7e7fca32 100644 --- a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java +++ b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java @@ -934,8 +934,10 @@ public class ExecuteTheRecipe { if (ConfigName.getInstance().PlcIsConnect) { TempControl(); - ReadPLCStatus(); + + //心跳 + WritePLC("心跳位",false,null); } } catch (Exception ex) { 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 0c55a490..3003308b 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 @@ -290,6 +290,8 @@ public class ConfigName { 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("料仓4校准开关", "M13.5", 0, 1)); + add(new Res_PLCADDRESS("料仓4校准值", "VW120", 1, 1)); add(new Res_PLCADDRESS("开始校正", "M12.6", 0, 1)); add(new Res_PLCADDRESS("料仓自动", "-------------", 0, 0)); @@ -299,12 +301,14 @@ public class ConfigName { add(new Res_PLCADDRESS("料仓2下料", "M11.2", 0, 1)); add(new Res_PLCADDRESS("料仓3需求值", "VW110", 1, 1)); add(new Res_PLCADDRESS("料仓3下料", "M11.3", 0, 1)); + add(new Res_PLCADDRESS("料仓4需求值", "VW122", 1, 1)); + add(new Res_PLCADDRESS("料仓4下料", "M13.4", 0, 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("料仓4手动开关", "M10.7", 1, 1)); //上下限 add(new Res_PLCADDRESS("位置上下限", "-------------", 0, 0)); add(new Res_PLCADDRESS("原点位置下限", "VD150", 1, 1)); @@ -339,9 +343,12 @@ public class ConfigName { add(new Res_PLCADDRESS("料仓1下料完成", "M41.2", 1, 0)); add(new Res_PLCADDRESS("料仓2下料完成", "M41.3", 1, 0)); add(new Res_PLCADDRESS("料仓3下料完成", "M41.4", 1, 0)); + add(new Res_PLCADDRESS("料仓4下料完成", "M42.0", 1, 0)); add(new Res_PLCADDRESS("炒锅清洗反馈", "M41.5", 1, 0)); add(new Res_PLCADDRESS("出餐启动反馈", "M41.6", 1, 0)); add(new Res_PLCADDRESS("炒锅倒菜减速位", "M41.7", 1, 0)); + add(new Res_PLCADDRESS("心跳位", "M43.0", 1, 0)); + //检测信号 add(new Res_PLCADDRESS("监测信号", "-------------", 0, 0)); @@ -376,7 +383,6 @@ public class ConfigName { add(new ProcessT("加热", Arrays.asList("加热功率", "延迟(秒)"))); add(new ProcessT("主料", Arrays.asList("主料名称", "主料重量"))); add(new ProcessT("液体料", new ArrayList<>())); - add(new ProcessT("加水", Arrays.asList("时长(秒)"))); add(new ProcessT("延迟", Arrays.asList("延迟(秒)"))); add(new ProcessT("出菜", Arrays.asList("等待(秒)"))); }}; @@ -442,6 +448,8 @@ public class ConfigName { 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("料仓4校准开关", "M13.5", 0, 1)); + add(new Res_PLCADDRESS("料仓4校准值", "VW120", 1, 1)); add(new Res_PLCADDRESS("开始校正", "M12.6", 0, 1)); add(new Res_PLCADDRESS("料仓自动", "-------------", 0, 0)); @@ -451,11 +459,14 @@ public class ConfigName { add(new Res_PLCADDRESS("料仓2下料", "M11.2", 0, 1)); add(new Res_PLCADDRESS("料仓3需求值", "VW110", 1, 1)); add(new Res_PLCADDRESS("料仓3下料", "M11.3", 0, 1)); + add(new Res_PLCADDRESS("料仓4需求值", "VW122", 1, 1)); + add(new Res_PLCADDRESS("料仓4下料", "M13.4", 0, 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("料仓4手动开关", "M10.7", 1, 1)); //上下限 add(new Res_PLCADDRESS("位置上下限", "-------------", 0, 0)); @@ -541,6 +552,7 @@ public class ConfigName { add(new Res_PLCADDRESS("料仓1下料完成", "M41.2", 1, 0)); add(new Res_PLCADDRESS("料仓2下料完成", "M41.3", 1, 0)); add(new Res_PLCADDRESS("料仓3下料完成", "M41.4", 1, 0)); + add(new Res_PLCADDRESS("料仓4下料完成", "M42.0", 1, 0)); add(new Res_PLCADDRESS("炒锅清洗反馈", "M41.5", 1, 0)); add(new Res_PLCADDRESS("出餐启动反馈", "M41.6", 1, 0)); add(new Res_PLCADDRESS("炒锅倒菜减速位", "M41.7", 1, 0)); @@ -553,6 +565,8 @@ public class ConfigName { add(new Res_PLCADDRESS("翻转轴在3号位", "M44.2", 1, 0)); add(new Res_PLCADDRESS("翻转轴在4号位", "M44.3", 1, 0)); add(new Res_PLCADDRESS("倒菜完成", "M44.4", 1, 0)); + add(new Res_PLCADDRESS("心跳位", "M43.0", 1, 0)); + //检测信号 add(new Res_PLCADDRESS("监测信号", "-------------", 0, 0)); @@ -588,7 +602,6 @@ public class ConfigName { add(new ProcessT("加热", Arrays.asList("加热功率", "延迟(秒)"))); add(new ProcessT("主料", Arrays.asList("主料名称", "主料位置", "主料重量", "投料动作","烹饪(秒)"))); add(new ProcessT("液体料", new ArrayList<>())); - add(new ProcessT("加水", Arrays.asList("时长(秒)"))); add(new ProcessT("延迟", Arrays.asList("延迟(秒)"))); add(new ProcessT("出菜", Arrays.asList("等待(秒)"))); }}; @@ -653,6 +666,8 @@ public class ConfigName { 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("料仓4校准开关", "M13.5", 0, 1)); + add(new Res_PLCADDRESS("料仓4校准值", "VW120", 1, 1)); add(new Res_PLCADDRESS("开始校正", "M12.6", 0, 1)); add(new Res_PLCADDRESS("料仓自动", "-------------", 0, 0)); @@ -662,11 +677,14 @@ public class ConfigName { add(new Res_PLCADDRESS("料仓2下料", "M11.2", 0, 1)); add(new Res_PLCADDRESS("料仓3需求值", "VW110", 1, 1)); add(new Res_PLCADDRESS("料仓3下料", "M11.3", 0, 1)); + add(new Res_PLCADDRESS("料仓4需求值", "VW122", 1, 1)); + add(new Res_PLCADDRESS("料仓4下料", "M13.4", 0, 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("料仓4手动开关", "M10.7", 1, 1)); //上下限 add(new Res_PLCADDRESS("位置上下限", "-------------", 0, 0)); @@ -752,6 +770,7 @@ public class ConfigName { add(new Res_PLCADDRESS("料仓1下料完成", "M41.2", 1, 0)); add(new Res_PLCADDRESS("料仓2下料完成", "M41.3", 1, 0)); add(new Res_PLCADDRESS("料仓3下料完成", "M41.4", 1, 0)); + add(new Res_PLCADDRESS("料仓4下料完成", "M42.0", 1, 0)); add(new Res_PLCADDRESS("炒锅清洗反馈", "M41.5", 1, 0)); add(new Res_PLCADDRESS("出餐启动反馈", "M41.6", 1, 0)); add(new Res_PLCADDRESS("炒锅倒菜减速位", "M41.7", 1, 0)); @@ -764,6 +783,7 @@ public class ConfigName { add(new Res_PLCADDRESS("翻转轴在3号位", "M44.2", 1, 0)); add(new Res_PLCADDRESS("翻转轴在4号位", "M44.3", 1, 0)); add(new Res_PLCADDRESS("倒菜完成", "M44.4", 1, 0)); + add(new Res_PLCADDRESS("心跳位", "M43.0", 1, 0)); //检测信号 add(new Res_PLCADDRESS("监测信号", "-------------", 0, 0)); @@ -799,7 +819,6 @@ public class ConfigName { add(new ProcessT("加热", Arrays.asList("加热功率", "延迟(秒)"))); add(new ProcessT("主料", Arrays.asList("主料名称", "主料位置", "主料重量", "投料动作","烹饪(秒)"))); add(new ProcessT("液体料", new ArrayList<>())); - add(new ProcessT("加水", Arrays.asList("时长(秒)"))); add(new ProcessT("延迟", Arrays.asList("延迟(秒)"))); add(new ProcessT("出菜", Arrays.asList("等待(秒)"))); }}; @@ -1024,6 +1043,7 @@ public class ConfigName { put(1, "未设置"); put(2, "未设置"); put(3, "未设置"); + put(4, "未设置"); }}; //endregion } diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentSBKZ.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentSBKZ.java index 70246bc0..ff99bea9 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentSBKZ.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentSBKZ.java @@ -461,7 +461,8 @@ public class HomeFragmentSBKZ extends BaseFragment { public void SetIDTouch(int id, boolean ismode) { switch (id) { case R.id.chushui: - PumpWater(ismode); + //PumpWater(ismode); + Pumping(4, ismode); Log.e("锅内加水", ismode ? "按下" : "松开"); break; case R.id.xiguoshui: diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/BunkerSetupActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/BunkerSetupActivity.java index 6ad9c6b5..6fe6dc6f 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/BunkerSetupActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/BunkerSetupActivity.java @@ -45,6 +45,9 @@ public class BunkerSetupActivity extends BaseActivity { @BindView(R.id.silos3) jingdutiao1 silos3; + @BindView(R.id.silos4) + jingdutiao1 silos4; + @BindView(R.id.quanchangqingxi) imagebuttom quanchangqingxi; @@ -130,6 +133,8 @@ public class BunkerSetupActivity extends BaseActivity { silos2.SetValue(item, myClickListener); } else if (item.num == 3) { silos3.SetValue(item, myClickListener); + }else if (item.num == 4) { + silos4.SetValue(item, myClickListener); } } } diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CookingActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CookingActivity.java index b1c4f2a9..4887699e 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CookingActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CookingActivity.java @@ -98,8 +98,8 @@ public class CookingActivity extends LinearLayout { @BindView(R.id.guokoucaoxiang) imagebuttom3 guokoucaoxiang; - @BindView(R.id.chushui) - imagebuttom3 chushui; +// @BindView(R.id.chushui) +// imagebuttom3 chushui; @BindView(R.id.touliao1) imagebuttom3 touliao1; @@ -119,6 +119,8 @@ public class CookingActivity extends LinearLayout { imagebuttom3 yeliao2; @BindView(R.id.yeliao3) imagebuttom3 yeliao3; + @BindView(R.id.yeliao4) + imagebuttom3 yeliao4; private Context contextMian; private View root; @@ -156,6 +158,9 @@ public class CookingActivity extends LinearLayout { yeliao3.setTag(ConfigName.getInstance().SilosDisplayMaterial.get(3)+""); yeliao3.Init(); + yeliao4.setTag(ConfigName.getInstance().SilosDisplayMaterial.get(4)+""); + yeliao4.Init(); + ConcurrentHashMap resultData= DataBus.getInstance().GetMainDisplayText(goods.id); touliao1.setTag(resultData.get(1)+"-按钮"); touliao1.Init(); @@ -391,8 +396,8 @@ public class CookingActivity extends LinearLayout { flicker_buttom.SetStatusKK(true); break; case "加水": - flicker_buttom=chushui; - flicker_buttom.SetStatusKK(true); +// flicker_buttom=chushui; +// flicker_buttom.SetStatusKK(true); break; case "液体料": if(val.equals("1")) @@ -407,6 +412,10 @@ public class CookingActivity extends LinearLayout { { flicker_buttom=yeliao3; flicker_buttom.SetStatusKK(true); + }else if(val.equals("4")) + { + flicker_buttom=yeliao4; + flicker_buttom.SetStatusKK(true); } break; } diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CookingSimulatedActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CookingSimulatedActivity.java index 36fb895a..81d23d21 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CookingSimulatedActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CookingSimulatedActivity.java @@ -87,8 +87,8 @@ public class CookingSimulatedActivity extends BaseActivity { @BindView(R.id.guokoucaoxiang) imagebuttom3 guokoucaoxiang; - @BindView(R.id.chushui) - imagebuttom3 chushui; +// @BindView(R.id.chushui) +// imagebuttom3 chushui; @BindView(R.id.touliao1) imagebuttom3 touliao1; @@ -109,6 +109,9 @@ public class CookingSimulatedActivity extends BaseActivity { @BindView(R.id.yeliao3) imagebuttom3 yeliao3; + @BindView(R.id.yeliao4) + imagebuttom3 yeliao4; + @BindView(R.id.showbuttomtop) RelativeLayout showbuttomtop; @@ -164,6 +167,9 @@ public class CookingSimulatedActivity extends BaseActivity { yeliao3.setTag(ConfigName.getInstance().SilosDisplayMaterial.get(3) + ""); yeliao3.Init(); + yeliao4.setTag(ConfigName.getInstance().SilosDisplayMaterial.get(4) + ""); + yeliao4.Init(); + ConcurrentHashMap resultData = DataBus.getInstance().GetMainDisplayText(goods.id); touliao1.setTag(resultData.get(1) + "-按钮"); touliao1.Init(); @@ -599,8 +605,8 @@ public class CookingSimulatedActivity extends BaseActivity { flicker_buttom.SetStatusKK(true); break; case "加水": - flicker_buttom = chushui; - flicker_buttom.SetStatusKK(true); +// flicker_buttom = chushui; +// flicker_buttom.SetStatusKK(true); break; case "液体料": if (val.equals("1")) { @@ -612,6 +618,9 @@ public class CookingSimulatedActivity extends BaseActivity { } else if (val.equals("3")) { flicker_buttom = yeliao3; flicker_buttom.SetStatusKK(true); + }else if (val.equals("4")) { + flicker_buttom = yeliao4; + flicker_buttom.SetStatusKK(true); } break; } diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DishTestActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DishTestActivity.java index 7c60d210..99d1a714 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DishTestActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DishTestActivity.java @@ -101,8 +101,8 @@ public class DishTestActivity extends BaseActivity { @BindView(R.id.fanchaoshudu_t) imagebuttom3 fanchaoshudu_t; - @BindView(R.id.chushui) - imagebuttom3 chushui; +// @BindView(R.id.chushui) +// imagebuttom3 chushui; @BindView(R.id.touliao1) imagebuttom3 touliao1; @@ -123,6 +123,9 @@ public class DishTestActivity extends BaseActivity { @BindView(R.id.yeliao3) imagebuttom3 yeliao3; + @BindView(R.id.yeliao4) + imagebuttom3 yeliao4; + @BindView(R.id.huoli) newhuoli_control huoli; @@ -240,7 +243,7 @@ public class DishTestActivity extends BaseActivity { fanchaoshudu_m.mListener = myClickListener; fanchaoshudu_t.mListener = myClickListener; - chushui.mListener = myClickListener; + //chushui.mListener = myClickListener; touliao1.mListener = myClickListener; touliao2.mListener = myClickListener; @@ -250,6 +253,7 @@ public class DishTestActivity extends BaseActivity { yeliao1.mListener = myClickListener; yeliao2.mListener = myClickListener; yeliao3.mListener = myClickListener; + yeliao4.mListener = myClickListener; huoli.mListener = myClickListener; @@ -286,6 +290,9 @@ public class DishTestActivity extends BaseActivity { yeliao3.setTag(ConfigName.getInstance().SilosDisplayMaterial.get(3) + "-按钮"); yeliao3.Init(); + yeliao4.setTag(ConfigName.getInstance().SilosDisplayMaterial.get(4) + "-按钮"); + yeliao4.Init(); + ShowIndex = 0; SetShowNameData(ShowIndex); gongyibuzhoujilu.setVisibility(View.GONE); @@ -398,6 +405,9 @@ public class DishTestActivity extends BaseActivity { case R.id.yeliao3: EditTextDialogBuilder(3); break; + case R.id.yeliao4: + EditTextDialogBuilder(4); + break; case R.id.huoli: SetFire(hl); break; diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/jingdutiao1.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/jingdutiao1.java index 1ad9737c..8b3165d9 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/jingdutiao1.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/jingdutiao1.java @@ -127,6 +127,15 @@ public class jingdutiao1 extends LinearLayout { }else if(num==3) { return "③"; + }else if(num==4) + { + return "④(水阀)"; + }else if(num==5) + { + return "⑤"; + }else if(num==6) + { + return "⑥"; }else { return "①"; diff --git a/app/src/main/res/layout/activity_bunkersetup.xml b/app/src/main/res/layout/activity_bunkersetup.xml index 593be080..ac501374 100644 --- a/app/src/main/res/layout/activity_bunkersetup.xml +++ b/app/src/main/res/layout/activity_bunkersetup.xml @@ -93,7 +93,6 @@ android:layout_height="80dp" android:background="@mipmap/silos_bottom" /> - + diff --git a/app/src/main/res/layout/activity_cooking.xml b/app/src/main/res/layout/activity_cooking.xml index 52dbfbb0..1b7eb8fb 100644 --- a/app/src/main/res/layout/activity_cooking.xml +++ b/app/src/main/res/layout/activity_cooking.xml @@ -312,14 +312,23 @@ android:orientation="vertical"> + + + + + + + + + diff --git a/app/src/main/res/layout/activity_cookingsimulated.xml b/app/src/main/res/layout/activity_cookingsimulated.xml index fef39d69..e2f45b5c 100644 --- a/app/src/main/res/layout/activity_cookingsimulated.xml +++ b/app/src/main/res/layout/activity_cookingsimulated.xml @@ -295,12 +295,21 @@ android:layout_marginRight="30dp" android:orientation="vertical"> + + + + + + + + + diff --git a/app/src/main/res/layout/activity_dishtest.xml b/app/src/main/res/layout/activity_dishtest.xml index e8c6af1c..2824f0fb 100644 --- a/app/src/main/res/layout/activity_dishtest.xml +++ b/app/src/main/res/layout/activity_dishtest.xml @@ -370,12 +370,21 @@ android:layout_marginRight="30dp" android:orientation="vertical"> + + + + + + + + + diff --git a/app/src/main/res/mipmap-mdpi/silos4.png b/app/src/main/res/mipmap-mdpi/silos4.png new file mode 100644 index 00000000..3228f853 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/silos4.png differ