diff --git a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj
index a29b2e0c..b726d000 100644
--- a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj
+++ b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj
@@ -182,6 +182,17 @@
+
+
+
+
+
+
+ Always
+
+
+ Always
+
diff --git a/BPASmartClient.CustomResource/Themes/MyStyle.xaml b/BPASmartClient.CustomResource/Themes/MyStyle.xaml
index 98e7661c..f734aa46 100644
--- a/BPASmartClient.CustomResource/Themes/MyStyle.xaml
+++ b/BPASmartClient.CustomResource/Themes/MyStyle.xaml
@@ -779,7 +779,7 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BPASmartClient.CustomResource/Vioce/取餐通知.wav b/BPASmartClient.CustomResource/Vioce/取餐通知.wav
new file mode 100644
index 00000000..1d5d35ca
Binary files /dev/null and b/BPASmartClient.CustomResource/Vioce/取餐通知.wav differ
diff --git a/BPASmartClient.CustomResource/Vioce/电子提示音.wav b/BPASmartClient.CustomResource/Vioce/电子提示音.wav
new file mode 100644
index 00000000..e0d3fed3
Binary files /dev/null and b/BPASmartClient.CustomResource/Vioce/电子提示音.wav differ
diff --git a/BPASmartClient.GSIceCream/IceCreamMachine.cs b/BPASmartClient.GSIceCream/IceCreamMachine.cs
index 0005faff..4cde3dd9 100644
--- a/BPASmartClient.GSIceCream/IceCreamMachine.cs
+++ b/BPASmartClient.GSIceCream/IceCreamMachine.cs
@@ -176,6 +176,7 @@ namespace BPASmartClient.GSIceCream
private void ProcessHeart(ICMSG_Heart_UP heartUpMsg)
{
+
IsConnected = OnLine;
status["IceCreamIsConnected"] = OnLine;
status["IceCreamCurrentMode"] = heartUpMsg.MS;
@@ -184,6 +185,8 @@ namespace BPASmartClient.GSIceCream
status["IceCreamHJWD"] = BitConverter.ToInt16(new byte[] { heartUpMsg.HJWD_L, heartUpMsg.HJWD_H }, 0);
status["IceCreamDL"] = BitConverter.ToInt16(new byte[] { heartUpMsg.DL_L, heartUpMsg.DL_H }, 0);
status["IceCreamFault"] = (MORKI_FAULT)BitConverter.ToInt16(new byte[] { heartUpMsg.GZ_L, heartUpMsg.GZ_H }, 0);
+ heartUpMsg.HasGZ(out string msg);
+ status["IceCreamError"] = msg;
status["IceCreamCXB"] = heartUpMsg.CXB;
status["IceCreamDLCompleted"] = (heartUpMsg.DLTJ >> 4 & 1) == 1;
diff --git a/BPASmartClient.GSIceCream/Protocal/ICMSG_Heart_UP.cs b/BPASmartClient.GSIceCream/Protocal/ICMSG_Heart_UP.cs
index a2daf77e..7a0516fe 100644
--- a/BPASmartClient.GSIceCream/Protocal/ICMSG_Heart_UP.cs
+++ b/BPASmartClient.GSIceCream/Protocal/ICMSG_Heart_UP.cs
@@ -65,7 +65,7 @@ namespace BPASmartClient.GSIceCream
msg += ((GZ_L >> 3) & 1) == 1 ? "皮带打滑" : string.Empty;
msg += ((GZ_L >> 2) & 1) == 1 ? "冻缸报警" : string.Empty;
msg += ((GZ_L >> 1) & 1) == 1 ? "缺料报警" : string.Empty;
-
+ msg = msg == string.Empty ? "无异常" : msg;
return string.IsNullOrEmpty(msg);
}
diff --git a/BPASmartClient.GSIceCream/Protocal/MORKI_FAULT.cs b/BPASmartClient.GSIceCream/Protocal/MORKI_FAULT.cs
index 161aabc2..f7a99ad8 100644
--- a/BPASmartClient.GSIceCream/Protocal/MORKI_FAULT.cs
+++ b/BPASmartClient.GSIceCream/Protocal/MORKI_FAULT.cs
@@ -28,5 +28,6 @@ namespace BPASmartClient.GSIceCream
皮带打滑 = 1 >> 4,
冻缸报警 = 1 >> 5,
缺料报警 = 1 >> 6,
+
}
}
diff --git a/BPASmartClient.KLMCoffee/CoffeeMachine.cs b/BPASmartClient.KLMCoffee/CoffeeMachine.cs
index 1c084580..e2a20f59 100644
--- a/BPASmartClient.KLMCoffee/CoffeeMachine.cs
+++ b/BPASmartClient.KLMCoffee/CoffeeMachine.cs
@@ -108,7 +108,7 @@ namespace BPASmartClient.KLMCoffee
{
byte item = dataStorage.GetData();
List data = new List() { item };
- if (Encoding.ASCII.GetString(data.ToArray()) == ":")
+ if (Encoding.ASCII.GetString(data.ToArray()) == ":")
{
temp.Add(item);
while (dataStorage.GetSize() < 32) { Thread.Sleep(5); }
@@ -119,10 +119,12 @@ namespace BPASmartClient.KLMCoffee
}
List vs = new List() { temp[temp.Count - 4], temp[temp.Count - 3], temp[temp.Count - 2], temp[temp.Count - 1] };
+ string t = Encoding.ASCII.GetString(vs.ToArray()).ToLower();
//帧尾
- if (Encoding.ASCII.GetString(vs.ToArray()).ToLower() == "\\r\\n" || Encoding.ASCII.GetString(vs.ToArray()).ToLower() == "\r\n")
+ //if (Encoding.ASCII.GetString(vs.ToArray()).ToLower() == "\\r\\n" || Encoding.ASCII.GetString(vs.ToArray()).ToLower() == "\r\n")
+ var package = Encoding.ASCII.GetString(temp.ToArray());
+ if(package.Contains("\\r\\n"))
{
- var package = Encoding.ASCII.GetString(temp.ToArray());
ProcessMsg(package);
}
temp.Clear();
@@ -136,25 +138,26 @@ namespace BPASmartClient.KLMCoffee
{
try
{
+ lastRefreshTime = DateTime.Now;
SystemStatusModel systemStatus = new K95Command().StateResolution(data);
if (systemStatus != null)
{
- status["CoffeeIsconnected"] = OnLine;
- if((K95SysTemStatus)status["Status"] == K95SysTemStatus.正在制作咖啡&&systemStatus.temStatus != K95SysTemStatus.正在制作咖啡)
+ status["CoffeeIsConnected"] = OnLine;
+ if((K95SysTemStatus)status["CoffeeStatus"] == K95SysTemStatus.正在制作咖啡&&systemStatus.temStatus != K95SysTemStatus.正在制作咖啡)
{
- status["Status"] = systemStatus.temStatus;
+ status["CoffeeStatus"] = systemStatus.temStatus;
EventBus.EventBus.GetInstance().Publish(new KLMCoffee_CoffeEndCookEvent { DeviceId = DeviceId });
}
else status["CoffeeStatus"] = systemStatus.temStatus;
status["CoffeedrinkType"] = systemStatus.drinkType;
status["CoffeeAppStatus"] = systemStatus.taskIndex;
status["Coffeeprogress"] = systemStatus.progress;
- status["CoffeeWarning"] = systemStatus.faultMessage.dataFault();
+ status["CoffeeWarning"] = systemStatus.faultMessage?.dataFault();
status["CoffeeKeep"] = systemStatus.upkeepMessage;
- if (systemStatus.faultMessage.IsFault() || systemStatus.upkeepMessage.IsUpkeep())
- IsWork = false;
- else
- IsWork = true;
+ //if (systemStatus.faultMessage.IsFault() || systemStatus.upkeepMessage.IsUpkeep())
+ // IsWork = false;
+ //else
+ // IsWork = true;
}
}
@@ -290,6 +293,7 @@ namespace BPASmartClient.KLMCoffee
}
});
InitStatus();
+ Start();
}
public override void WriteData(string address, object value)
diff --git a/BPASmartClient.KLMCoffee/Protocal/SystemStatusModel.cs b/BPASmartClient.KLMCoffee/Protocal/SystemStatusModel.cs
index 8a44c5de..720ddb58 100644
--- a/BPASmartClient.KLMCoffee/Protocal/SystemStatusModel.cs
+++ b/BPASmartClient.KLMCoffee/Protocal/SystemStatusModel.cs
@@ -90,11 +90,11 @@ namespace BPASmartClient.KLMCoffee.Protocal
if (makeSta.Substring(2,1) == ((TaskIndex)Enum.Parse(typeof(TaskIndex),item)).GetString())
taskIndex = ((TaskIndex)Enum.Parse(typeof(TaskIndex),item));
}
-
- if (makeProgress1 != "0000")
- progress = Convert.ToInt32(makeProgress,16) / Convert.ToInt32(makeProgress1,16);
- faultMessage = new FaultMessage(ErrorL,ErrorH);
+ faultMessage = new FaultMessage(ErrorL, ErrorH);
upkeepMessage = new UpkeepMessage(InFormation);
+ if ( makeProgress1 != "0000")
+ progress = Convert.ToInt32(makeProgress,16) / Convert.ToInt32(makeProgress1,16);
+
}
catch (Exception ex)
{
diff --git a/BPASmartClient.LebaiRobot/LebaiHelper.cs b/BPASmartClient.LebaiRobot/LebaiHelper.cs
index cb9bcbc4..9acf7a53 100644
--- a/BPASmartClient.LebaiRobot/LebaiHelper.cs
+++ b/BPASmartClient.LebaiRobot/LebaiHelper.cs
@@ -365,37 +365,18 @@ namespace BPASmartClient.LebaiRobot
await client?.RunScene(id);
MessageLog.GetInstance.Show($"调用场景:{id}");
}
- ///
- /// 设置输出
- ///
- ///
- ///
- public void SetOutput(bool bDO, int pin = 0)
- {
- try
- {
- if (client == null) { return; }
- var res = client.SetDIO(new DIO() { Pin = pin, Value = bDO ? 1 : 0 });
- }
- catch (Exception ex)
- {
- MessageLog.GetInstance.ShowEx(ex.ToString());
- }
- }
-
- public void MoveL(double pose)
- {
- //try
- //{
- // if (client == null) { return; }
- // var res = client.MovePT(new PVATRequest() { })
-
- //}
- //catch (Exception ex)
- //{
- // MessageLog.GetInstance.ShowEx(ex.ToString());
- //}
- }
+ //public async void ExecuteLua()
+ // {
+ // try
+ // {
+ // string lua = ""
+ // if (client == null) return;
+ // await client?.ExecuteLua()
+
+ // }
+ // catch (Exception ex)
+
+ // }
}
}
diff --git a/BPASmartClient.MQTT/MQTTProxy.cs b/BPASmartClient.MQTT/MQTTProxy.cs
index bdad1d69..43c31708 100644
--- a/BPASmartClient.MQTT/MQTTProxy.cs
+++ b/BPASmartClient.MQTT/MQTTProxy.cs
@@ -8,6 +8,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
+using System.Threading;
using System.Threading.Tasks;
namespace BPASmartClient.MQTT
@@ -23,7 +24,7 @@ namespace BPASmartClient.MQTT
private IMqttClient client;
public void Connect(string userName, string Password, string ip, int port, string clientId)
- {
+ {
IConfigurationBuilder configurationBuilder = new ConfigurationBuilder();
configurationBuilder.AddMqttClientHostedService(p =>
{
@@ -63,6 +64,13 @@ namespace BPASmartClient.MQTT
{
if (client.IsConnected)
await client.PublishAsync(topic, content);
+ else
+ {
+ client?.ReconnectAsync();
+ Thread.Sleep(10);
+ }
+
+
}
public async void Subscrib(params string[] topics)
diff --git a/BPASmartClient.Model/乐白机器人/Enum/Lebai_qsqdCode.cs b/BPASmartClient.Model/乐白机器人/Enum/Lebai_qsqdCode.cs
index a6505da7..530bb3e5 100644
--- a/BPASmartClient.Model/乐白机器人/Enum/Lebai_qsqdCode.cs
+++ b/BPASmartClient.Model/乐白机器人/Enum/Lebai_qsqdCode.cs
@@ -9,6 +9,7 @@ namespace BPASmartClient.Model.乐白机器人.Enum
public class Lebai_qsqdCode
{
#region 且时且多设备
+ public const int SENCE_自嗨 = 10008;
public const int SENCE_取咖啡杯 = 10031;
public const int SENCE_取冰淇淋杯 = 10032;
public const int SENCE_咖啡杯检测 = 10033;
diff --git a/BPASmartClient.MorkS/BPASmartClient.MorkS.csproj b/BPASmartClient.MorkS/BPASmartClient.MorkS.csproj
index f5f6ce16..a262445e 100644
--- a/BPASmartClient.MorkS/BPASmartClient.MorkS.csproj
+++ b/BPASmartClient.MorkS/BPASmartClient.MorkS.csproj
@@ -11,6 +11,7 @@
+
diff --git a/BPASmartClient.MorkS/Control_Morks.cs b/BPASmartClient.MorkS/Control_Morks.cs
index 0e080003..c2530892 100644
--- a/BPASmartClient.MorkS/Control_Morks.cs
+++ b/BPASmartClient.MorkS/Control_Morks.cs
@@ -18,6 +18,9 @@ using BPASmartClient.MorkS.Model;
using System.Collections.ObjectModel;
using BPASmartClient.MorkS.ViewModel;
using BPASmartClient.Business;
+using System.Speech.Synthesis;
+using System.Windows.Forms;
+using System.Media;
namespace BPASmartClient.MorkS
{
@@ -29,6 +32,7 @@ namespace BPASmartClient.MorkS
public override void DoMain()
{
+
MonitorViewModel.DeviceId = DeviceId;
ServerInit();
DataParse();
@@ -51,22 +55,26 @@ namespace BPASmartClient.MorkS
}
}
- ActionManage.GetInstance.Register(new Action(() =>
+ ActionManage.GetInstance.Register(new Action
diff --git a/SmartClient.sln b/SmartClient.sln
index ce457d02..5a83489f 100644
--- a/SmartClient.sln
+++ b/SmartClient.sln
@@ -96,7 +96,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkTHQ", "B
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DosingSystem", "DosingSystem\DosingSystem.csproj", "{4E0B01AD-CFD0-4BD5-BBE6-AD2A4183B4DB}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPASmartClient.MorkTJuicer", "BPASmartClient.MorkTJuicer\BPASmartClient.MorkTJuicer.csproj", "{724087A3-E7E7-4494-B844-414FF5CD1D40}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkTJuicer", "BPASmartClient.MorkTJuicer\BPASmartClient.MorkTJuicer.csproj", "{724087A3-E7E7-4494-B844-414FF5CD1D40}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPASmartClient.MorkTM", "BPASmartClient.MorkTM\BPASmartClient.MorkTM.csproj", "{C404A775-A36C-4A0A-B25B-C4212DC2293D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -892,6 +894,26 @@ Global
{724087A3-E7E7-4494-B844-414FF5CD1D40}.Release|x64.Build.0 = Release|Any CPU
{724087A3-E7E7-4494-B844-414FF5CD1D40}.Release|x86.ActiveCfg = Release|Any CPU
{724087A3-E7E7-4494-B844-414FF5CD1D40}.Release|x86.Build.0 = Release|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Debug|ARM.Build.0 = Debug|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Debug|x64.Build.0 = Debug|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Debug|x86.Build.0 = Debug|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Release|ARM.ActiveCfg = Release|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Release|ARM.Build.0 = Release|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Release|ARM64.Build.0 = Release|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Release|x64.ActiveCfg = Release|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Release|x64.Build.0 = Release|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Release|x86.ActiveCfg = Release|Any CPU
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -936,6 +958,7 @@ Global
{00C17D87-A323-4A97-BC21-7039E55614DE} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
{4E0B01AD-CFD0-4BD5-BBE6-AD2A4183B4DB} = {8712125E-14CD-4E1B-A1CE-4BDE03805942}
{724087A3-E7E7-4494-B844-414FF5CD1D40} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
+ {C404A775-A36C-4A0A-B25B-C4212DC2293D} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9AEC9B81-0222-4DE9-B642-D915C29222AC}