diff --git a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj
index c564c012..becbdc01 100644
--- a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj
+++ b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj
@@ -200,7 +200,17 @@
-
+
+
+
+
+
+
+ Always
+
+
+ Always
+
diff --git a/BPASmartClient.CustomResource/Themes/MyStyle.xaml b/BPASmartClient.CustomResource/Themes/MyStyle.xaml
index edcd7882..4cf9e73a 100644
--- a/BPASmartClient.CustomResource/Themes/MyStyle.xaml
+++ b/BPASmartClient.CustomResource/Themes/MyStyle.xaml
@@ -947,7 +947,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.DRCoffee/CoffeeMachine.cs b/BPASmartClient.DRCoffee/CoffeeMachine.cs
index 40464a54..2bd9da96 100644
--- a/BPASmartClient.DRCoffee/CoffeeMachine.cs
+++ b/BPASmartClient.DRCoffee/CoffeeMachine.cs
@@ -191,6 +191,7 @@ namespace BPASmartClient.DRCoffee
commProxy.SendData(DrCoffee.Packe(drinksOrder));
Thread.Sleep(200);
free = false;
+ MessageLog.GetInstance.Show($"咖啡机: 制作咖啡指令");
}
catch (Exception ex)
{
@@ -210,6 +211,7 @@ namespace BPASmartClient.DRCoffee
commProxy.SendData(DrCoffee.Packe(drinksOrder));
Thread.Sleep(200);
free = false;
+ MessageLog.GetInstance.Show($"咖啡机: 咖啡取消指令");
}
catch (Exception ex)
{
@@ -228,6 +230,7 @@ namespace BPASmartClient.DRCoffee
commProxy.SendData(DrCoffee.Packe(drinksOrder));
Thread.Sleep(200);
free = false;
+ MessageLog.GetInstance.Show($"咖啡机: 咖啡模式设置指令");
}
catch (Exception ex)
{
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.IceMaker/IceMakerMachine.cs b/BPASmartClient.IceMaker/IceMakerMachine.cs
index c71a614e..3ec59078 100644
--- a/BPASmartClient.IceMaker/IceMakerMachine.cs
+++ b/BPASmartClient.IceMaker/IceMakerMachine.cs
@@ -5,7 +5,7 @@ using BPASmartClient.Peripheral;
using BPASmartClient.SerialPort;
using static BPASmartClient.EventBus.EventBus;
-namespace BPASmartClient.Icemoker
+namespace BPASmartClient.IceMaker
{
public class IceMakerMachine : BasePeripheral
{
diff --git a/BPASmartClient.IceMaker/IceMakerStatus.cs b/BPASmartClient.IceMaker/IceMakerStatus.cs
deleted file mode 100644
index 83fb3404..00000000
--- a/BPASmartClient.IceMaker/IceMakerStatus.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace BPASmartClient.IceMaker
-{
- public enum IceMakerStatus
- {
- 关机状态=0x01,
- 制冰状态=0x02,
- 电机故障=0x04,
- 缺水=0x08,
- 冰满=0x16
- }
-}
diff --git a/BPASmartClient.Juicer/JuicerMachine.cs b/BPASmartClient.Juicer/JuicerMachine.cs
index f1963006..2a834412 100644
--- a/BPASmartClient.Juicer/JuicerMachine.cs
+++ b/BPASmartClient.Juicer/JuicerMachine.cs
@@ -17,6 +17,7 @@ namespace BPASmartClient.Juicer
ThreadManage.GetInstance().StartLong(new Action(() =>
{
IsConnected = juicerHelper.IsOpen;
+ status["JuiceIsConnect"] = juicerHelper.IsOpen;
if (!IsConnected) IsWork = false;
while (IsConnected)
{
diff --git a/BPASmartClient.KLMCoffee/CoffeeMachine.cs b/BPASmartClient.KLMCoffee/CoffeeMachine.cs
index ae5519cf..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,19 +138,26 @@ namespace BPASmartClient.KLMCoffee
{
try
{
+ lastRefreshTime = DateTime.Now;
SystemStatusModel systemStatus = new K95Command().StateResolution(data);
if (systemStatus != null)
{
- status["Status"] = systemStatus.temStatus;
- status["drinkType"] = systemStatus.drinkType;
- status["AppStatus"] = systemStatus.taskIndex;
- status["progress"] = systemStatus.progress;
- status["Warning"] = systemStatus.faultMessage.dataFault();
- status["Keep"] = systemStatus.upkeepMessage;
- if (systemStatus.faultMessage.IsFault() || systemStatus.upkeepMessage.IsUpkeep())
- IsWork = false;
- else
- IsWork = true;
+ status["CoffeeIsConnected"] = OnLine;
+ if((K95SysTemStatus)status["CoffeeStatus"] == K95SysTemStatus.正在制作咖啡&&systemStatus.temStatus != K95SysTemStatus.正在制作咖啡)
+ {
+ 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["CoffeeKeep"] = systemStatus.upkeepMessage;
+ //if (systemStatus.faultMessage.IsFault() || systemStatus.upkeepMessage.IsUpkeep())
+ // IsWork = false;
+ //else
+ // IsWork = true;
}
}
@@ -160,18 +169,18 @@ namespace BPASmartClient.KLMCoffee
protected override void InitStatus()
{
- status["Status"] = K95SysTemStatus.空闲状态;
- status["drinkType"] = DrinkType.意式;
- status["AppStatus"] = TaskIndex.无任务;
- status["progress"] = 0;
- status["Warning"] = new FaultMessage(0x00, 0x00).dataFault();
- status["Keep"] = new UpkeepMessage(0x00).dataFault();
+ status["CoffeeStatus"] = K95SysTemStatus.空闲状态;
+ status["CoffeedrinkType"] = DrinkType.意式;
+ status["CoffeeAppStatus"] = TaskIndex.无任务;
+ status["Coffeeprogress"] = 0;
+ status["CoffeeWarning"] = new FaultMessage(0x00, 0x00).dataFault();
+ status["CoffeeKeep"] = new UpkeepMessage(0x00).dataFault();
}
public override void Init()
{
- commProxy = new SerialPortClient(PortName, (BaudRates)Enum.Parse(typeof(BaudRates), BaudRate));
+ commProxy = new SerialPortClient(communicationPar.SerialPort, (BaudRates)communicationPar.BaudRate);
commProxy.SetDataStorage(dataStorage);
//伽乐美咖啡机制作
@@ -284,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 5cfa1212..9acf7a53 100644
--- a/BPASmartClient.LebaiRobot/LebaiHelper.cs
+++ b/BPASmartClient.LebaiRobot/LebaiHelper.cs
@@ -365,5 +365,18 @@ namespace BPASmartClient.LebaiRobot
await client?.RunScene(id);
MessageLog.GetInstance.Show($"调用场景:{id}");
}
+
+ //public async void ExecuteLua()
+ // {
+ // try
+ // {
+ // string lua = ""
+ // if (client == null) return;
+ // await client?.ExecuteLua()
+
+ // }
+ // catch (Exception ex)
+
+ // }
}
}
diff --git a/BPASmartClient.Model/乐白机器人/Enum/Lebai_qsqdCode.cs b/BPASmartClient.Model/乐白机器人/Enum/Lebai_qsqdCode.cs
index 42d7557e..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;
@@ -29,6 +30,7 @@ namespace BPASmartClient.Model.乐白机器人.Enum
public const int SENCE_冰淇淋杯回原点 = 10049;
public const int SENCE_取咖啡出餐 = 10052;
+ public const int SENCE_机器人回原点 = 10058;
// 单片机冰淇淋机器场景
public const int SENCE_单片机接冰淇淋 = 10055;
public const int SENCE_单片机放冰淇淋位置 = 10056;
diff --git a/BPASmartClient.MorkF/Control_MorkF.cs b/BPASmartClient.MorkF/Control_MorkF.cs
index 7b50e106..7f0aa20e 100644
--- a/BPASmartClient.MorkF/Control_MorkF.cs
+++ b/BPASmartClient.MorkF/Control_MorkF.cs
@@ -522,11 +522,8 @@ namespace BPASmartClient.MorkF
}
}
}
-
- }
-
+ }
});
-
}
private void OrderChange(string subid, ORDER_STATUS oRDER_STATUS)
diff --git a/BPASmartClient.MorkS/BPASmartClient.MorkS.csproj b/BPASmartClient.MorkS/BPASmartClient.MorkS.csproj
index b6534cb0..336101e6 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 3841c1aa..0a20b717 100644
--- a/BPASmartClient.MorkS/Control_Morks.cs
+++ b/BPASmartClient.MorkS/Control_Morks.cs
@@ -20,6 +20,9 @@ using BPASmartClient.MorkS.ViewModel;
using BPASmartClient.Business;
using BPASmartClient.Model.小炒机;
using BPA.Models;
+using System.Speech.Synthesis;
+using System.Windows.Forms;
+using System.Media;
namespace BPASmartClient.MorkS
{
@@ -31,6 +34,7 @@ namespace BPASmartClient.MorkS
public override void DoMain()
{
+
MonitorViewModel.DeviceId = DeviceId;
ServerInit();
DataParse();
@@ -53,22 +57,26 @@ namespace BPASmartClient.MorkS
}
}
- ActionManage.GetInstance.Register(new Action(() =>
+ ActionManage.GetInstance.Register(new Action