修改开关灯参数
通信的调试(未使用)
This commit is contained in:
parent
b427d32b44
commit
6fbb8e6273
@ -50,7 +50,7 @@ namespace Plane.FormationCreator
|
|||||||
{
|
{
|
||||||
loginWindow = new ConnectWindow();
|
loginWindow = new ConnectWindow();
|
||||||
}
|
}
|
||||||
loginWindow.ShowDialog();
|
loginWindow.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnLogin_Click(object sender, RoutedEventArgs e)
|
private void btnLogin_Click(object sender, RoutedEventArgs e)
|
||||||
|
@ -132,7 +132,21 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
{
|
{
|
||||||
return _WriteIdCommand ?? (_WriteIdCommand = new RelayCommand(async () =>
|
return _WriteIdCommand ?? (_WriteIdCommand = new RelayCommand(async () =>
|
||||||
{
|
{
|
||||||
await WriteIdCommandAsync(CopterNum);
|
await WriteIdCommandAsync(CopterNum, MavComm.COMMANDTYPE4);
|
||||||
|
}
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private ICommand _ChangeWriteMissionCommand;
|
||||||
|
public ICommand ChangeWriteMissionCommand
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _ChangeWriteMissionCommand ?? (_ChangeWriteMissionCommand = new RelayCommand(async () =>
|
||||||
|
{
|
||||||
|
await WriteIdCommandAsync(0, MavComm.COMM_WRITE_MISSION);
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@ -279,9 +293,11 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private async Task WriteIdCommandAsync(int num)
|
|
||||||
|
|
||||||
|
private async Task WriteIdCommandAsync(int num, short messageType)
|
||||||
{
|
{
|
||||||
await commModule.GeneratePacketAsync((short)num, (byte)Protocols.MavComm.COMMANDTYPE4);
|
await commModule.GeneratePacketAsync((short)num, messageType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private const string NTF_GROUPLED_OFF = "NTF_GROUPLED_OFF";
|
private const string NTF_GROUPLED_OFF = "NTF_GLED_OFF";
|
||||||
private ICommand _LEDOnOffCommand;
|
private ICommand _LEDOnOffCommand;
|
||||||
public ICommand LEDOnOffCommand
|
public ICommand LEDOnOffCommand
|
||||||
{
|
{
|
||||||
|
@ -108,6 +108,7 @@
|
|||||||
IsProcessing="{Binding IsProcessing}"
|
IsProcessing="{Binding IsProcessing}"
|
||||||
Command="{Binding Path=ConnectCommand}"
|
Command="{Binding Path=ConnectCommand}"
|
||||||
CommandParameter="SerialPort" />
|
CommandParameter="SerialPort" />
|
||||||
|
<Button Content="切换写航点" Margin="5,5,0,5" Command="{Binding Path=ChangeWriteMissionCommand}" />
|
||||||
<!--<ec:ProgressButton Name="btnConnectUdp"
|
<!--<ec:ProgressButton Name="btnConnectUdp"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.ColumnSpan="3"
|
Grid.ColumnSpan="3"
|
||||||
@ -128,6 +129,7 @@
|
|||||||
<Button Content="设置20台" Margin="5" Command="{Binding Path=SendCommand}" />
|
<Button Content="设置20台" Margin="5" Command="{Binding Path=SendCommand}" />
|
||||||
<Button Content="写入航点" Margin="5" Command="{Binding Path=CommWriteMissionCommand}" />
|
<Button Content="写入航点" Margin="5" Command="{Binding Path=CommWriteMissionCommand}" />
|
||||||
<Button Content="广播编号" Margin="5,5,0,5" Command="{Binding Path=WriteIdCommand}" />
|
<Button Content="广播编号" Margin="5,5,0,5" Command="{Binding Path=WriteIdCommand}" />
|
||||||
|
|
||||||
<TextBox Margin="2,5,5,5" Width="30" Text="{Binding CopterNum}"></TextBox>
|
<TextBox Margin="2,5,5,5" Width="30" Text="{Binding CopterNum}"></TextBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user