ソースを参照

小炒锅菜品库基本稳定版本

样式分支
yahaha 2年前
コミット
0e06cdcbc1
5個のファイルの変更664行の追加387行の削除
  1. +639
    -359
      BPASmartClient.MorkF/Control_MorkF.cs
  2. +1
    -11
      BPASmartClient.MorkF/ML_MorkF.cs
  3. +9
    -8
      BPASmartClient.MorkF/MaterialOperation.cs
  4. +8
    -8
      BPASmartClient.MorkF/View/DebugView.xaml
  5. +7
    -1
      BPASmartClient.MorkF/ViewModel/DebugViewModel.cs

+ 639
- 359
BPASmartClient.MorkF/Control_MorkF.cs
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 1
- 11
BPASmartClient.MorkF/ML_MorkF.cs ファイルの表示

@@ -43,17 +43,7 @@ namespace BPASmartClient.MorkF
{
get
{
var ret = _ArriveComplete;
_ArriveComplete = false;
if(ret)
{
MessageLog.GetInstance.Show("到达上升沿为true");
}
else
{
MessageLog.GetInstance.Show("到达上升沿为false");
}
return ret;
return _ArriveComplete;
}
set
{


+ 9
- 8
BPASmartClient.MorkF/MaterialOperation.cs ファイルの表示

@@ -6,19 +6,20 @@ using System.Threading.Tasks;

namespace BPASmartClient.MorkF
{
public class Coordinate
{
public int X { get; set; } = 0;

public int Y { get; set; } = 0;
}

/// <summary>
/// 菜品库操作类
/// </summary>
internal class MaterialOperation
{
/// <summary>
/// x轴坐标
/// </summary>
public int x;
/// <summary>
/// y轴坐标
/// </summary>
public int y;
public Coordinate coordinate { get; set; } = new Coordinate();

/// <summary>
/// 炒锅编号
/// </summary>


+ 8
- 8
BPASmartClient.MorkF/View/DebugView.xaml ファイルの表示

@@ -89,7 +89,7 @@
<TextBlock Text="移动速度:" Margin="5,0"/>
<TextBox Text="{Binding MoveSpeed}" Width="70" Margin="5,0" VerticalAlignment="Center" />
<Button Content="设定" Command="{Binding SetSpeed}" Cursor="Hand" Margin="5,0,10,0" />
<Button Content="感应器1测距" Margin="5,0" Command="{Binding GetDistance_1}"/>
<Button Content="感应器1测距" Margin="5,0" Command="{Binding GetDistance_1}" Cursor="Hand"/>
<TextBox Text="{Binding SensingDistance_1}" Margin="5,0" Width="60" IsReadOnly="True"/>
<Button Content="感应器2测距" Margin="5,0" Command="{Binding GetDistance_2}"/>
<TextBox Text="{Binding SensingDistance_2}" Margin="5,0" Width="60" IsReadOnly="True"/>
@@ -107,15 +107,15 @@
<WrapPanel Grid.Row="3" Orientation="Horizontal" >
<Button Content="夹爪正转" Command="{Binding PawTurnFront}" Margin="5,0" Cursor="Hand"/>
<Button Content="夹爪反转" Command="{Binding PawTurnBack}" Margin="5,0" Cursor="Hand"/>
<RadioButton Content="位置1" Margin="5,0" IsEnabled="True" IsChecked="{Binding PawPositon1}" Command="{Binding GetDistance_1}" GroupName="PawTurn"/>
<RadioButton Content="位置2" Margin="5,0" IsEnabled="True" IsChecked="{Binding PawPositon2}" Command="{Binding GetDistance_2}" GroupName="PawTurn"/>
<RadioButton Content="位置3" Margin="5,0 " IsEnabled="True" IsChecked="{Binding PawPositon3}" Command="{Binding GetDistance_3}" GroupName="PawTurn"/>
<RadioButton Content="位置1" Margin="5,0" IsEnabled="True" IsChecked="{Binding PawPositon1}" Command="{Binding PawToPoint1}" GroupName="PawTurn"/>
<RadioButton Content="位置2" Margin="5,0" IsEnabled="True" IsChecked="{Binding PawPositon2}" Command="{Binding PawToPoint2}" GroupName="PawTurn"/>
<RadioButton Content="位置3" Margin="5,0 " IsEnabled="True" IsChecked="{Binding PawPositon3}" Command="{Binding PawToPoint3}" GroupName="PawTurn"/>
</WrapPanel>
<WrapPanel Grid.Row="4" Orientation="Horizontal" >
<RadioButton Content="上" Margin="5,0" IsEnabled="{Binding ArmRunEnable}" IsChecked="{Binding ArmRunUp}" Command="{Binding GetDistance_1}" GroupName="ArmRun"/>
<RadioButton Content="下" Margin="5,0" IsEnabled="{Binding ArmRunEnable}" IsChecked="{Binding ArmRunDown}" Command="{Binding GetDistance_2}" GroupName="ArmRun"/>
<RadioButton Content="左" Margin="5,0 " IsEnabled="{Binding ArmRunEnable}" IsChecked="{Binding ArmRunLeft}" Command="{Binding GetDistance_3}" GroupName="ArmRun"/>
<RadioButton Content="右" Margin="5,0 " IsEnabled="{Binding ArmRunEnable}" IsChecked="{Binding ArmRunRight}" Command="{Binding GetDistance_3}" GroupName="ArmRun"/>
<RadioButton Content="上" Margin="5,0" IsEnabled="{Binding ArmRunEnable}" IsChecked="{Binding ArmRunUp}" GroupName="ArmRun"/>
<RadioButton Content="下" Margin="5,0" IsEnabled="{Binding ArmRunEnable}" IsChecked="{Binding ArmRunDown}" GroupName="ArmRun"/>
<RadioButton Content="左" Margin="5,0 " IsEnabled="{Binding ArmRunEnable}" IsChecked="{Binding ArmRunLeft}" GroupName="ArmRun"/>
<RadioButton Content="右" Margin="5,0 " IsEnabled="{Binding ArmRunEnable}" IsChecked="{Binding ArmRunRight}" GroupName="ArmRun"/>
<Button Content="{Binding ArmButtonName}" Command="{Binding ArmRun}" Margin="5,0" Cursor="Hand">
</Button>
</WrapPanel>


+ 7
- 1
BPASmartClient.MorkF/ViewModel/DebugViewModel.cs ファイルの表示

@@ -96,6 +96,9 @@ namespace BPASmartClient.MorkF.ViewModel
public RelayCommand PawTurnBack { get; set; }//夹爪反转
public RelayCommand SetArmPosition { get; set; }//机器臂位置设定
public RelayCommand ArmRun { get; set; }//机械臂运动
public RelayCommand PawToPoint1 { get; set; }//感应测距1
public RelayCommand PawToPoint2 { get; set; }//感应测距2
public RelayCommand PawToPoint3 { get; set; }//感应测距3

#endregion

@@ -207,8 +210,11 @@ namespace BPASmartClient.MorkF.ViewModel
StopElectromagnetism = new RelayCommand(() => { ActionManage.GetInstance.Send("Electromagnetism", new List<bool> { true });});//电磁阀关闭
SetSpeed = new RelayCommand(() =>
{
ActionManage.GetInstance.Send("SetSpeed", new List<int> { MoveSpeed });
ActionManage.GetInstance.Send("SetSpeed", new List<int> { MoveSpeed });
});//设定速度
PawToPoint1 = new RelayCommand(() => { ActionManage.GetInstance.Send("PawToPoint1"); });//爪子去1号位
PawToPoint2 = new RelayCommand(() => { ActionManage.GetInstance.Send("PawToPoint2"); });//爪子去2号位
PawToPoint3 = new RelayCommand(() => { ActionManage.GetInstance.Send("PawToPoint3"); });//爪子去3号位
GetDistance_1 = new RelayCommand(() => { ActionManage.GetInstance.Send("GetDistance_1"); });//感应距离1
GetDistance_2 = new RelayCommand(() => { ActionManage.GetInstance.Send("GetDistance_2"); });//感应距离2
GetDistance_3 = new RelayCommand(() => { ActionManage.GetInstance.Send("GetDistance_3"); });//感应距离3


読み込み中…
キャンセル
保存