Browse Source

临时修改

master
pry 2 years ago
parent
commit
725259e08e
4 changed files with 33 additions and 25 deletions
  1. +0
    -2
      HBLConsole.Factory/SimpleFactory.cs
  2. +9
    -0
      HBLConsole.GVL/InternetInfo.cs
  3. +18
    -17
      HBLConsole.MORKJC/Control_MORKJC.cs
  4. +6
    -6
      HBLConsole/App.config

+ 0
- 2
HBLConsole.Factory/SimpleFactory.cs View File

@@ -156,8 +156,6 @@ namespace HBLConsole.Factory
}
Thread.Sleep(1000);
}), "订单解析线程");


}

/// <summary>


+ 9
- 0
HBLConsole.GVL/InternetInfo.cs View File

@@ -77,6 +77,9 @@ namespace HBLConsole.GVL
MqttPort = MQTT_Config.Port;
MqttPassword = "12345678";
MqttUserName = "rafiul";

//MqttPassword = "emqx_p_admin8765490789";
//MqttUserName = "emqx_u_block";
}

if (MQTT_Config == null) MessageLog.GetInstance.Show("获取配置数据为空!");
@@ -211,4 +214,10 @@ namespace HBLConsole.GVL
public string Host { get; set; }
public int Port { get; set; }
}

public class MQTT_Account
{
public string UserName { get; set; }
public string Password { get; set; }
}
}

+ 18
- 17
HBLConsole.MORKJC/Control_MORKJC.cs View File

@@ -96,7 +96,7 @@ namespace HBLConsole.MORKJC
{
MessageLog.GetInstance.Show($"开始制作订单[{order.SortNum}]");


//商品类型
GOODS_TYPE currentGoodsType = GOODS_TYPE.NEITHER;
@@ -270,7 +270,7 @@ namespace HBLConsole.MORKJC
JaKaHelper.GetInstance.JaKaProgramName(JaKaHelper.SENCE_接茶);
Wait(int.Parse(JaKaHelper.SENCE_接茶));

MCUSerialHelper.GetInstance.ServoControl(1, 105);
MCUSerialHelper.GetInstance.ServoControl(1, 105);
Thread.Sleep(1000);
MCUSerialHelper.GetInstance.ServoControl(1, 130);
Thread.Sleep(1000);
@@ -380,7 +380,7 @@ namespace HBLConsole.MORKJC
switch (JuicerNum1)
{
case 52:
if(GuMake)
if (GuMake)
{
JuicerNum = 0x00;
}
@@ -493,7 +493,7 @@ namespace HBLConsole.MORKJC
Wait(int.Parse(JaKaHelper.SENCE_初始位));
}
}
else
else
{
switch (JuicerNum1)
{
@@ -544,7 +544,7 @@ namespace HBLConsole.MORKJC
/// 取杯流程
/// </summary>
/// <returns>0:无意义,1:取杯成功 2:机构有杯子,取杯失败 3:机构没有杯子</returns>
private int takeCup()
private int takeCup()
{
try
{
@@ -560,12 +560,12 @@ namespace HBLConsole.MORKJC
JaKaHelper.GetInstance.JaKaProgramName(JaKaHelper.SENCE_取杯);
Wait(int.Parse(JaKaHelper.SENCE_取杯));
bSensorInput = sensor_Sign(1);
while (bSensorInput == 3 )
while (bSensorInput == 3)
{
Thread.Sleep(100);
bSensorInput = sensor_Sign(1);
}
if (bSensorInput == 2)
if (bSensorInput == 2)
{
Thread.Sleep(500);
MCUSerialHelper.GetInstance.OutputControl(1, false);
@@ -590,7 +590,7 @@ namespace HBLConsole.MORKJC
Thread.Sleep(100);
bSensorInput = sensor_Sign(1);
}
while (getCup_cnt < 4 && (bSensorInput==2|| bSensorInput == 3))
while (getCup_cnt < 4 && (bSensorInput == 2 || bSensorInput == 3))
{
MessageLog.GetInstance.Show($"第{getCup_cnt}次取杯失败");
Thread.Sleep(500);
@@ -610,7 +610,7 @@ namespace HBLConsole.MORKJC
{
return 1;
}
else
else
{
return 2;
}
@@ -631,7 +631,7 @@ namespace HBLConsole.MORKJC
{
try
{
while (checkCup() == 2)
while (checkCup() == 2)
{
Thread.Sleep(100);
}
@@ -656,7 +656,7 @@ namespace HBLConsole.MORKJC
}
return 1;
}
catch (Exception ex)
catch (Exception ex)
{
MessageLog.GetInstance.Show(ex.ToString());
return 0;
@@ -667,7 +667,7 @@ namespace HBLConsole.MORKJC
/// 检测放杯位,是否有杯子
/// </summary>
/// <returns>0:无意义 1:没有杯子 2:有杯子 </returns>
private int checkCup()
private int checkCup()
{
try
{
@@ -689,14 +689,15 @@ namespace HBLConsole.MORKJC
{
MessageLog.GetInstance.Show($"放杯位传感器没有信号:{cnt_Check}");
return 1;
} else if (cnt_Check<=-20)
}
else if (cnt_Check <= -20)
{
MessageLog.GetInstance.Show($"放杯位传感器有信号:{cnt_Check}");
return 2;
}
}
}
catch (Exception ex)
catch (Exception ex)
{
MessageLog.GetInstance.Show(ex.ToString());
return 0;
@@ -707,7 +708,7 @@ namespace HBLConsole.MORKJC
/// </summary>
/// <param name="num"></param>
/// <returns></returns>
private int sensor_Sign(byte num)
private int sensor_Sign(byte num)
{
int cnt = 0;
cnt_Check = 0;
@@ -725,7 +726,7 @@ namespace HBLConsole.MORKJC
cnt_Check = cnt_Check - 1;
cnt = cnt + 1;
}
if (cnt >= 20)
if (cnt >= 20)
{
if (cnt_Check >= 0)
{
@@ -738,7 +739,7 @@ namespace HBLConsole.MORKJC
return 2;
}
}
}

}


+ 6
- 6
HBLConsole/App.config View File

@@ -15,27 +15,27 @@
<add key="deviceId" value="13"/>-->

<add key="ClientId" value="49"/>
<add key="deviceId" value="31"/>
<add key="deviceId" value="35"/>


<!--开发环境-->
<add key="ApolloUri" value="http://10.2.1.21:28080"/>
<!--<add key="ApolloUri" value="http://10.2.1.21:28080"/>
<add key="OrderServiceUri" value="https://bpa.black-pa.com:21527/order/"/>
<add key="StockServiceUri" value="https://bpa.black-pa.com:21527/stock/"/>
<add key="AppId" value="dev1_common"/>
<add key ="Namespaces" value="DEV.Config"/>
<!--<add key ="DeviceMakeUri" value="https://bpa.black-pa.com:21527/GetDeviceMake/"/>-->
<add key ="DeviceMakeUri" value="https://bpa.black-pa.com:21527/GetDeviceMake/"/>-->


<!--正式环境-->
<!--<add key="ApolloUri" value="http://47.108.65.220:28080"/>
<add key="ApolloUri" value="http://47.108.65.220:28080"/>
<add key="OrderServiceUri" value="https://witt.black-pa.com/order/"/>
<add key="StockServiceUri" value="https://witt.black-pa.com/stock/"/>
<add key="DataVServiceUri" value="https://witt.black-pa.com/datav"/>
<add key="WebServiceUri" value="https://witt.black-pa.com"/>
<add key="AppId" value="order"/>
<add key="AppId" value="order"/>
<add key ="Namespaces" value="TEST1.Config"/>
<add key="BroadcastPubTopic" value="/broadcast/grgpECHSL7q/Transit_SetDevice"/>-->
<add key="BroadcastPubTopic" value="/broadcast/grgpECHSL7q/Transit_SetDevice"/>

<!--通用配置-->
<add key="BroadcastPubTopic" value="/broadcast/grgpECHSL7q/Transit_Test_SetDevice"/>


Loading…
Cancel
Save