瀏覽代碼

Merge branch 'master' of http://10.2.1.24:10244/bpa/BPASmartClient

样式分支
fyf 2 年之前
父節點
當前提交
ae64d10413
共有 7 個文件被更改,包括 76 次插入35 次删除
  1. +0
    -4
      BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj
  2. +1
    -0
      BPASmartClient.DRCoffee/CoffeeMachine.cs
  3. +1
    -6
      BPASmartClient.GSIceCream/IceCreamMachine.cs
  4. +1
    -0
      BPASmartClient.Lebai/LebaiRobot.cs
  5. +11
    -22
      BPASmartClient.MorkT/Control_MorkT.cs
  6. +59
    -0
      BPASmartClient.MorkT/GLV_MorkT.cs
  7. +3
    -3
      BPASmartClient/App.config

+ 0
- 4
BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj 查看文件

@@ -171,10 +171,6 @@
<None Remove="Image\黑菠萝科技.png" /> <None Remove="Image\黑菠萝科技.png" />
</ItemGroup> </ItemGroup>


<ItemGroup>
<Page Remove="Properties\App.xaml" />
</ItemGroup>

<ItemGroup> <ItemGroup>
<Resource Include="Image\btn_close.png" /> <Resource Include="Image\btn_close.png" />
<Resource Include="Image\ComboBoxPopSelect.png" /> <Resource Include="Image\ComboBoxPopSelect.png" />


+ 1
- 0
BPASmartClient.DRCoffee/CoffeeMachine.cs 查看文件

@@ -148,6 +148,7 @@ namespace BPASmartClient.DRCoffee
lastRefreshTime = DateTime.Now; lastRefreshTime = DateTime.Now;
IsConnected = OnLine; IsConnected = OnLine;
status["CoffeConnected"] = OnLine;
new DRCoffee_CoffeEndCookEvent() { DeviceId = DeviceId }.Publish(); new DRCoffee_CoffeEndCookEvent() { DeviceId = DeviceId }.Publish();
} }
else status["Status"] = package.Status; else status["Status"] = package.Status;


+ 1
- 6
BPASmartClient.GSIceCream/IceCreamMachine.cs 查看文件

@@ -88,12 +88,6 @@ namespace BPASmartClient.GSIceCream


ThreadManage.GetInstance().StartLong(new Action(() => 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(); ResolveMsg();
}), "冰淇淋解析线程"); }), "冰淇淋解析线程");
} }
@@ -183,6 +177,7 @@ namespace BPASmartClient.GSIceCream
private void ProcessHeart(ICMSG_Heart_UP heartUpMsg) private void ProcessHeart(ICMSG_Heart_UP heartUpMsg)
{ {
IsConnected = OnLine; IsConnected = OnLine;
status["IceCreamIsConnected"] = OnLine;
status["CurrentMode"] = heartUpMsg.MS; status["CurrentMode"] = heartUpMsg.MS;
status["YLWD"] = BitConverter.ToInt16(new byte[] { heartUpMsg.YLWD_L,heartUpMsg.YLWD_H },0); 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); status["HQWD"] = BitConverter.ToInt16(new byte[] { heartUpMsg.HQWD_L,heartUpMsg.HQWD_H },0);


+ 1
- 0
BPASmartClient.Lebai/LebaiRobot.cs 查看文件

@@ -45,6 +45,7 @@ namespace BPASmartClient.Lebai
ThreadManage.GetInstance().StartLong(() => ThreadManage.GetInstance().StartLong(() =>
{ {
IsConnected = LebaiHelper.GetInstance().IsConnected; IsConnected = LebaiHelper.GetInstance().IsConnected;
status["RobotIsConnected"] = LebaiHelper.GetInstance().IsConnected;
status["OK"] = LebaiHelper.GetInstance().GetValueAsync().Ok; status["OK"] = LebaiHelper.GetInstance().GetValueAsync().Ok;
status["Value"] = LebaiHelper.GetInstance().GetValueAsync().Value; status["Value"] = LebaiHelper.GetInstance().GetValueAsync().Value;
if (LebaiHelper.GetInstance().robotData != null) status["RobotMode"] = LebaiHelper.GetInstance().robotData.RobotMode.Mode; if (LebaiHelper.GetInstance().robotData != null) status["RobotMode"] = LebaiHelper.GetInstance().robotData.RobotMode.Mode;


+ 11
- 22
BPASmartClient.MorkT/Control_MorkT.cs 查看文件

@@ -40,11 +40,7 @@ namespace BPASmartClient.MorkT
morkT.MakeCoffeeOrder.OrderStatus = 1; morkT.MakeCoffeeOrder.OrderStatus = 1;
}); });
int i = 0; int i = 0;
////ThreadManage.GetInstance().StartLong(new Action(() =>
////{
//// i = (int)Status.status["GSIceCream.IceCreamMachine.test"];
////}),"test");


MessageLog.GetInstance.Show("MORKT 设备初始化完成"); MessageLog.GetInstance.Show("MORKT 设备初始化完成");


@@ -71,16 +67,6 @@ namespace BPASmartClient.MorkT
public override void MainTask() public override void MainTask()
{ {


GetStatus("RobotMode", new Action<object>((o) =>
{


}));





MakeCoffeeProcess(); MakeCoffeeProcess();
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_GetInputEvent { DeviceId = DeviceId, Pin = 0 },(o)=> EventBus.EventBus.GetInstance().Publish(new LebaiRobot_GetInputEvent { DeviceId = DeviceId, Pin = 0 },(o)=>
{ {
@@ -98,7 +84,10 @@ namespace BPASmartClient.MorkT


public override void ReadData() public override void ReadData()
{ {
GetStatus("IsConnected", new Action<object>((o) =>
{
}));
} }




@@ -223,7 +212,7 @@ namespace BPASmartClient.MorkT


private void Wait(int value = 101) 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); Thread.Sleep(5);
} }
@@ -364,14 +353,14 @@ namespace BPASmartClient.MorkT
{ {
if (IceCreamCanMake()) 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; bool result = true;
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_GetInputEvent { DeviceId = DeviceId, Pin = 3 }, (res) => EventBus.EventBus.GetInstance().Publish(new LebaiRobot_GetInputEvent { DeviceId = DeviceId, Pin = 3 }, (res) =>
@@ -491,7 +480,7 @@ namespace BPASmartClient.MorkT
{ {
int count_1 = 0; int count_1 = 0;


while ((short)Status.status["GSIceCream.IceCreamMachine.CBX"] <= 86)
while ((short)peripheralStatus["CBX"] <= 86)
{ {
Thread.Sleep(5); Thread.Sleep(5);
count_1++; count_1++;


+ 59
- 0
BPASmartClient.MorkT/GLV_MorkT.cs 查看文件

@@ -1,4 +1,8 @@
using BPASmartClient.Device; using BPASmartClient.Device;
using BPASmartClient.DRCoffee;
using BPASmartClient.GSIceCream;
using BPASmartClient.LebaiRobot;
using BPASmartClient.Model.冰淇淋.Enum;
using Robotc; using Robotc;
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
@@ -40,5 +44,60 @@ namespace BPASmartClient.MorkT
/// 冰淇淋机器出料口传感器检测 /// 冰淇淋机器出料口传感器检测
/// </summary> /// </summary>
public bool IceIsOK = true; 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
} }
} }

+ 3
- 3
BPASmartClient/App.config 查看文件

@@ -19,10 +19,10 @@
<!--阿里云上报启动方式:API 或者 LOCAL--> <!--阿里云上报启动方式:API 或者 LOCAL-->
<!--API :通过客户端ID,调用接口查询“设备连接信息”--> <!--API :通过客户端ID,调用接口查询“设备连接信息”-->
<!--LOCAL:直接使用下方本地“设备连接信息”--> <!--LOCAL:直接使用下方本地“设备连接信息”-->
<add key="StartupMode" value="API"/>
<add key="StartupMode" value="LOCAL"/>
<add key="ProductKey" value="grgpECHSL7q"/> <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=="/> <add key="PasswordBox" value="6WrKhYmTIhLV7g24jIH/lg=="/>






Loading…
取消
儲存