@@ -171,10 +171,6 @@ | |||
<None Remove="Image\黑菠萝科技.png" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Page Remove="Properties\App.xaml" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Resource Include="Image\btn_close.png" /> | |||
<Resource Include="Image\ComboBoxPopSelect.png" /> | |||
@@ -148,6 +148,7 @@ namespace BPASmartClient.DRCoffee | |||
lastRefreshTime = DateTime.Now; | |||
IsConnected = OnLine; | |||
status["CoffeConnected"] = OnLine; | |||
new DRCoffee_CoffeEndCookEvent() { DeviceId = DeviceId }.Publish(); | |||
} | |||
else status["Status"] = package.Status; | |||
@@ -88,12 +88,6 @@ namespace BPASmartClient.GSIceCream | |||
ThreadManage.GetInstance().StartLong(new Action(() => | |||
{ | |||
status["test"] = 0; | |||
for (int i = 0; i < 1000; i++) | |||
{ | |||
status["test"] = (int)status["test"] + 1; | |||
Thread.Sleep(1000); | |||
} | |||
ResolveMsg(); | |||
}), "冰淇淋解析线程"); | |||
} | |||
@@ -183,6 +177,7 @@ namespace BPASmartClient.GSIceCream | |||
private void ProcessHeart(ICMSG_Heart_UP heartUpMsg) | |||
{ | |||
IsConnected = OnLine; | |||
status["IceCreamIsConnected"] = OnLine; | |||
status["CurrentMode"] = heartUpMsg.MS; | |||
status["YLWD"] = BitConverter.ToInt16(new byte[] { heartUpMsg.YLWD_L,heartUpMsg.YLWD_H },0); | |||
status["HQWD"] = BitConverter.ToInt16(new byte[] { heartUpMsg.HQWD_L,heartUpMsg.HQWD_H },0); | |||
@@ -45,6 +45,7 @@ namespace BPASmartClient.Lebai | |||
ThreadManage.GetInstance().StartLong(() => | |||
{ | |||
IsConnected = LebaiHelper.GetInstance().IsConnected; | |||
status["RobotIsConnected"] = LebaiHelper.GetInstance().IsConnected; | |||
status["OK"] = LebaiHelper.GetInstance().GetValueAsync().Ok; | |||
status["Value"] = LebaiHelper.GetInstance().GetValueAsync().Value; | |||
if (LebaiHelper.GetInstance().robotData != null) status["RobotMode"] = LebaiHelper.GetInstance().robotData.RobotMode.Mode; | |||
@@ -40,11 +40,7 @@ namespace BPASmartClient.MorkT | |||
morkT.MakeCoffeeOrder.OrderStatus = 1; | |||
}); | |||
int i = 0; | |||
////ThreadManage.GetInstance().StartLong(new Action(() => | |||
////{ | |||
//// i = (int)Status.status["GSIceCream.IceCreamMachine.test"]; | |||
////}),"test"); | |||
MessageLog.GetInstance.Show("MORKT 设备初始化完成"); | |||
@@ -71,16 +67,6 @@ namespace BPASmartClient.MorkT | |||
public override void MainTask() | |||
{ | |||
GetStatus("RobotMode", new Action<object>((o) => | |||
{ | |||
})); | |||
MakeCoffeeProcess(); | |||
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_GetInputEvent { DeviceId = DeviceId, Pin = 0 },(o)=> | |||
{ | |||
@@ -98,7 +84,10 @@ namespace BPASmartClient.MorkT | |||
public override void ReadData() | |||
{ | |||
GetStatus("IsConnected", new Action<object>((o) => | |||
{ | |||
})); | |||
} | |||
@@ -223,7 +212,7 @@ namespace BPASmartClient.MorkT | |||
private void Wait(int value = 101) | |||
{ | |||
while (!((bool)Status.status["Lebai.LebaiRobot.OK"] && (int)Status.status["Lebai.LebaiRobot.Value"] == value)) | |||
while (!((bool)peripheralStatus["OK"] && (int)peripheralStatus["Value"] == value)) | |||
{ | |||
Thread.Sleep(5); | |||
} | |||
@@ -364,14 +353,14 @@ namespace BPASmartClient.MorkT | |||
{ | |||
if (IceCreamCanMake()) | |||
{ | |||
if(Status.status.ContainsKey("GSIceCream.IceCreamMachine.CurrentMode")) | |||
if(peripheralStatus.ContainsKey("CurrentMode")) | |||
{ | |||
if ((MORKI_MODE)Status.status["GSIceCream.IceCreamMachine.CurrentMode"] != MORKI_MODE.制冷模式) new GSIceCream_ModeSetEvent() { Mode = MORKI_MODE.制冷模式 }.Publish(); | |||
if ((MORKI_MODE)peripheralStatus["CurrentMode"] != MORKI_MODE.制冷模式) new GSIceCream_ModeSetEvent() { Mode = MORKI_MODE.制冷模式 }.Publish(); | |||
} | |||
if(Status.status.ContainsKey("GSIceCream.IceCreamMachine.CBX")) | |||
if(peripheralStatus.ContainsKey(".CBX")) | |||
{ | |||
if ((short)Status.status["GSIceCream.IceCreamMachine.CBX"] >= 86 && morkT.morkOrderPushesIceCream.Count > 0)//成型比大于86才可以制作 | |||
if ((short)peripheralStatus["CBX"] >= 86 && morkT.morkOrderPushesIceCream.Count > 0)//成型比大于86才可以制作 | |||
{ | |||
bool result = true; | |||
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_GetInputEvent { DeviceId = DeviceId, Pin = 3 }, (res) => | |||
@@ -491,7 +480,7 @@ namespace BPASmartClient.MorkT | |||
{ | |||
int count_1 = 0; | |||
while ((short)Status.status["GSIceCream.IceCreamMachine.CBX"] <= 86) | |||
while ((short)peripheralStatus["CBX"] <= 86) | |||
{ | |||
Thread.Sleep(5); | |||
count_1++; | |||
@@ -1,4 +1,8 @@ | |||
using BPASmartClient.Device; | |||
using BPASmartClient.DRCoffee; | |||
using BPASmartClient.GSIceCream; | |||
using BPASmartClient.LebaiRobot; | |||
using BPASmartClient.Model.冰淇淋.Enum; | |||
using Robotc; | |||
using System; | |||
using System.Collections.Concurrent; | |||
@@ -40,5 +44,60 @@ namespace BPASmartClient.MorkT | |||
/// 冰淇淋机器出料口传感器检测 | |||
/// </summary> | |||
public bool IceIsOK = true; | |||
#region | |||
[VariableMonitor("机器人连接状态")] | |||
public bool RobotIsConnected; | |||
[VariableMonitor("机器人状态")] | |||
public ELebaiRModel RobotMode; | |||
[VariableMonitor("冰淇淋连接状态")] | |||
public bool IceCreamIsConnected; | |||
[VariableMonitor("冰淇淋机器预冷温度")] | |||
public short YLWD; | |||
[VariableMonitor("冰淇淋机器回气温度")] | |||
public short HQWD; | |||
[VariableMonitor("冰淇淋机器环境温度")] | |||
public short HJWD; | |||
[VariableMonitor("冰淇淋机器电流")] | |||
public short DL; | |||
[VariableMonitor("冰淇淋机器电压")] | |||
public bool DY; | |||
[VariableMonitor("冰淇淋机器成型比")] | |||
public byte CBX; | |||
[VariableMonitor("冰淇淋机器模式")] | |||
public MORKI_MODE IceCreamMode; | |||
[VariableMonitor("冰淇淋机器故障")] | |||
public MORKI_FAULT IceCreamFault; | |||
[VariableMonitor("冰淇淋机器打料是否完成")] | |||
public bool DLCompleted; | |||
[VariableMonitor("咖啡机连接状态")] | |||
public bool CoffeeIsConnected; | |||
[VariableMonitor("咖啡机状态")] | |||
public DrCoffeeStatus DrCoffeeStatus; | |||
[VariableMonitor("咖啡机应用状态")] | |||
public DrCoffeeAppStatus CoffeeAppStatus; | |||
[VariableMonitor("咖啡机告警")] | |||
public DrCoffeeWarning CoffeeWarning; | |||
[VariableMonitor("咖啡机故障")] | |||
public DrCoffeeFault CaffeeFault; | |||
#endregion | |||
} | |||
} |
@@ -19,10 +19,10 @@ | |||
<!--阿里云上报启动方式:API 或者 LOCAL--> | |||
<!--API :通过客户端ID,调用接口查询“设备连接信息”--> | |||
<!--LOCAL:直接使用下方本地“设备连接信息”--> | |||
<add key="StartupMode" value="API"/> | |||
<add key="StartupMode" value="LOCAL"/> | |||
<add key="ProductKey" value="grgpECHSL7q"/> | |||
<add key="DeviceName" value="qsqd"/> | |||
<add key="DeviceSecret" value="3c0f2390943bff4fece523af22655196"/> | |||
<add key="DeviceName" value="qsqdzklb"/> | |||
<add key="DeviceSecret" value="e2b300892c3e21469c8dc6c7c5c4430d"/> | |||
<add key="PasswordBox" value="6WrKhYmTIhLV7g24jIH/lg=="/> | |||