Browse Source

morkTM

样式分支
NXX 2 years ago
parent
commit
fa92389a58
5 changed files with 48 additions and 19 deletions
  1. +14
    -14
      BPASmartClient.MorkT/Control_MorkT.cs
  2. +2
    -2
      BPASmartClient.MorkT/ViewModel/DebugViewModel.cs
  3. +7
    -1
      BPASmartClient.MorkTM/Control_MorkTM.cs
  4. +2
    -2
      BPASmartClient/MainWindow.xaml
  5. +23
    -0
      SmartClient.sln

+ 14
- 14
BPASmartClient.MorkT/Control_MorkT.cs View File

@@ -76,21 +76,21 @@ namespace BPASmartClient.MorkT

public override void MainTask()
{
if (morkTime.AddMinutes(Global.TimeInterval).Minute == DateTime.Now.Minute)
{
morkTime = DateTime.Now;
if ((ELebaiRModel)peripheralStatus["RobotMode"] == ELebaiRModel.空闲状态)
{
MessageLog.GetInstance.Show("机器人开始自嗨!");
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }, (o) => { });
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_LebaiSenceEvent { DeviceId = DeviceId, LebaiSence = Lebai_qsqdCode.SENCE_自嗨 });
Wait();
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 1 }, (o) => { });
Thread.Sleep(50);
}
//if (morkTime.AddMinutes(Global.TimeInterval).Minute == DateTime.Now.Minute)
//{
// morkTime = DateTime.Now;
// if ((ELebaiRModel)peripheralStatus["RobotMode"] == ELebaiRModel.空闲状态)
// {
// MessageLog.GetInstance.Show("机器人开始自嗨!");
// EventBus.EventBus.GetInstance().Publish(new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }, (o) => { });
// EventBus.EventBus.GetInstance().Publish(new LebaiRobot_LebaiSenceEvent { DeviceId = DeviceId, LebaiSence = Lebai_qsqdCode.SENCE_自嗨 });
// Wait();
// EventBus.EventBus.GetInstance().Publish(new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 1 }, (o) => { });
// Thread.Sleep(50);
// }

}
else if (morkTime.AddMinutes(Global.TimeInterval) < DateTime.Now) morkTime = DateTime.Now;
//}
//else if (morkTime.AddMinutes(Global.TimeInterval) < DateTime.Now) morkTime = DateTime.Now;
#region morkt流程
//if (morkT.waitMorkOrder != null)//更新订单取走状态
//{


+ 2
- 2
BPASmartClient.MorkT/ViewModel/DebugViewModel.cs View File

@@ -244,9 +244,9 @@ namespace BPASmartClient.MorkT.ViewModel
//EventBus.EventBus.GetInstance().Publish(new SCChip_RotorSwitchEvent { DeviceId = DeviceId, TurnOn = true });
//Thread.Sleep(500);
//EventBus.EventBus.GetInstance().Publish(new SCChip_RotorSwitchEvent { DeviceId = DeviceId, TurnOn = false });
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_SetOutPutEvent { DeviceId = DeviceId, bDO = true, pin = 1 });
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_SetOutPutEvent { DeviceId = DeviceId, Value = true, Pin = 1 });
Thread.Sleep(500);
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_SetOutPutEvent { DeviceId = DeviceId, bDO = false, pin = 1 });
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_SetOutPutEvent { DeviceId = DeviceId, Value = false, Pin = 1 });

}



+ 7
- 1
BPASmartClient.MorkTM/Control_MorkTM.cs View File

@@ -158,7 +158,13 @@ namespace BPASmartClient.MorkTM

public override void SimOrder()
{
throw new NotImplementedException();
ActionManage.GetInstance.Register(new Action<object>((o) =>
{
if (o is string goodName)
{

}
}), "");
}

public override void Stop()


+ 2
- 2
BPASmartClient/MainWindow.xaml View File

@@ -55,7 +55,7 @@
<StackPanel
x:Name="myPanel"
Orientation="Horizontal"
Visibility="Collapsed">
Visibility="Visible">
<Button
Width="120"
Height="40"
@@ -81,7 +81,7 @@
Tag="OrderStatusView" />
</StackPanel>
<!--#endregion-->
<Menu x:Name="myMenu" Visibility="Visible">
<Menu x:Name="myMenu" Visibility="Collapsed">
<MenuItem Header="功能列表">
<MenuItem
Click="MenuItem_Click"


+ 23
- 0
SmartClient.sln View File

@@ -116,6 +116,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestDemo", "TestDemo\TestDe
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.HubHelper", "BPASmartClient.HubHelper\BPASmartClient.HubHelper.csproj", "{099E047C-F40E-47A3-A5BA-81FC1500D5E8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkTM", "BPASmartClient.MorkTM\BPASmartClient.MorkTM.csproj", "{38158761-8060-4C53-BD50-CCF531C5ED0B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -1090,6 +1092,26 @@ Global
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Release|x64.Build.0 = Release|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Release|x86.ActiveCfg = Release|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Release|x86.Build.0 = Release|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Debug|ARM.ActiveCfg = Debug|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Debug|ARM.Build.0 = Debug|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Debug|ARM64.Build.0 = Debug|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Debug|x64.ActiveCfg = Debug|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Debug|x64.Build.0 = Debug|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Debug|x86.ActiveCfg = Debug|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Debug|x86.Build.0 = Debug|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Release|Any CPU.Build.0 = Release|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Release|ARM.ActiveCfg = Release|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Release|ARM.Build.0 = Release|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Release|ARM64.ActiveCfg = Release|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Release|ARM64.Build.0 = Release|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Release|x64.ActiveCfg = Release|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Release|x64.Build.0 = Release|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Release|x86.ActiveCfg = Release|Any CPU
{38158761-8060-4C53-BD50-CCF531C5ED0B}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1143,6 +1165,7 @@ Global
{E7168B03-68E5-4285-BB95-5660F877577A} = {8712125E-14CD-4E1B-A1CE-4BDE03805942}
{A49E1C5A-9489-451C-9CE6-CEA586234B84} = {8712125E-14CD-4E1B-A1CE-4BDE03805942}
{099E047C-F40E-47A3-A5BA-81FC1500D5E8} = {3D1D0E04-03FD-480A-8CF8-6E01A2E28625}
{38158761-8060-4C53-BD50-CCF531C5ED0B} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9AEC9B81-0222-4DE9-B642-D915C29222AC}


Loading…
Cancel
Save