diff --git a/Plane.FormationCreator/MainWindow.xaml b/Plane.FormationCreator/MainWindow.xaml index 3c3e992..a31793f 100644 --- a/Plane.FormationCreator/MainWindow.xaml +++ b/Plane.FormationCreator/MainWindow.xaml @@ -161,8 +161,9 @@ - - + + + @@ -317,5 +318,8 @@ + + + diff --git a/Plane.FormationCreator/ViewModels/ConnectViewModel.cs b/Plane.FormationCreator/ViewModels/ConnectViewModel.cs index c9920a9..f0f7e4f 100644 --- a/Plane.FormationCreator/ViewModels/ConnectViewModel.cs +++ b/Plane.FormationCreator/ViewModels/ConnectViewModel.cs @@ -270,6 +270,27 @@ namespace Plane.FormationCreator.ViewModels } } + + private ICommand _TestPWMCommandAsync; + public ICommand TestPWMCommandAsync + { + get + { + return _TestPWMCommandAsync ?? (_TestPWMCommandAsync = new RelayCommand(async () => + { + try + { + int channel = 10; //固定10是控制PWM舵机 + await commModule.TestFire((short)CopterNum, channel); + } + catch + { } + + } + )); + } + } + private ICommand _TestFireCommandAsync; public ICommand TestFireCommandAsync { diff --git a/Plane.FormationCreator/Views/ConnectWindow.xaml b/Plane.FormationCreator/Views/ConnectWindow.xaml index 90fc952..78fa6a8 100644 --- a/Plane.FormationCreator/Views/ConnectWindow.xaml +++ b/Plane.FormationCreator/Views/ConnectWindow.xaml @@ -44,9 +44,10 @@ - - + diff --git a/Plane.FormationCreator/Views/CopterListView.xaml b/Plane.FormationCreator/Views/CopterListView.xaml index 59fbe6a..107aa6b 100644 --- a/Plane.FormationCreator/Views/CopterListView.xaml +++ b/Plane.FormationCreator/Views/CopterListView.xaml @@ -31,9 +31,9 @@ - + - +