Plane.FormationCreator/Plane.FormationCreator/Views/ControlPanelView.xaml
xu 32110aab07 [feat] 调整双通道发送框架和界面
为了广播通道能服务于所有广播命令,调整广播发送框架,
 将通道选择从rtk发送界面移到设置界面
 右下角加入广播通道是否打开的提示
 RTK发送状态的提示从按钮旁边移动到主界面状态栏,并加入更多信息
 调整连接状态图标

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2024-06-28 18:29:06 +08:00

236 lines
9.8 KiB
XML

<UserControl x:Class="Plane.FormationCreator.Views.ControlPanelView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Plane.FormationCreator.Views"
xmlns:fc="clr-namespace:Plane.FormationCreator"
xmlns:ec="clr-namespace:Plane.Copters;assembly=PlaneGcsSdk_Private_NET46"
xmlns:vm="clr-namespace:Plane.FormationCreator.ViewModels"
xmlns:m="clr-namespace:Plane.FormationCreator.Formation"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="300">
<StackPanel Margin="0,0,-8,0">
<StackPanel.Resources>
<Style TargetType="Button"
BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Margin"
Value="0,0,3,5" />
</Style>
</StackPanel.Resources>
<!--<TextBlock Text="连接" />
<WrapPanel>
<Button Content="连接"
Command="{Binding ConnectCommand}" />
<Button Content="断开"
Command="{Binding DisconnectCommand}" />
</WrapPanel>-->
<TabControl Margin="0,0,13,0">
<TabItem Header="飞行前准备">
<StackPanel Orientation="Vertical" Margin="0,5,0,0">
<WrapPanel>
<Button Content="电压检测"
Command="{Binding DetectionVoltage}" />
<Button Content="版本检测"
Command="{Binding GetVersionsCommand}" />
<Button Content="通讯版本" Command="{Binding DetectionCommModuleVersion}" />
<Button Content="统计返回"
Command="{Binding DetectionReturnData}" />
<Button Content="通讯统计"
Command="{Binding GetCommsumCommand}" />
</WrapPanel>
<WrapPanel>
<Button Content="参数设置"
Command="{Binding ParamModify}" />
<Button Content="读入参数"
Command="{Binding LoadParamfile}" />
<Button Content="状态统计" Command="{Binding ReportGPSTypeCommand}"/>
<Button Content="飞机校准"
Command="{Binding CalibrationSingleCommand}" />
<Button Content="正式参数" Command="{Binding TurnOffTestLightsCommand}" Visibility="Collapsed" />
<Button Content="电机" Visibility="Collapsed"
Command="{Binding MotorTestCommand}" />
<Button Content="删除飞机"
Command="{Binding DelCommand}" />
<Label Visibility="Collapsed" Content="Lat"/>
<TextBox Visibility="Collapsed" Text="{Binding LatOffset}" Width="50"/>
<Label Visibility="Collapsed" Content="Lng"/>
<TextBox Visibility="Collapsed" Text="{Binding LngOffset}" Width="50"/>
<Button Visibility="Collapsed" Content="设置返航点" Command="{Binding RLTOffsetCommand}" />
</WrapPanel>
<WrapPanel>
<Button Content="写入航点"
Command="{Binding WriteMissionCommand}" />
<Button Content="航点续写"
Command="{Binding WriteMissionFailedCommand}" />
<Button Content="选写航点" Command="{Binding WriteMissionSingleCommand}" />
<Button Content="统计航点"
Command="{Binding DetectionMissionData}" />
<TextBox
Grid.Column="1"
Width="55"
Margin="5, 5, 5, 5"
HorizontalContentAlignment="Right"
Text="{Binding RTKcomvalue, UpdateSourceTrigger=PropertyChanged}" Visibility="Collapsed"
/>
<Button Content="{Binding RTKbtntxt}"
Command="{Binding SendRTKCommand}" Visibility="Collapsed" />
<Button Content="{Binding NTRIPbtntxt}"
Command="{Binding SendRTCMCommand}" Visibility="Collapsed"/>
<Button Content="RTK 控制" Command="{Binding OpenRtcmManageCommand}" />
</WrapPanel>
</StackPanel>
</TabItem>
<TabItem Header="飞行控制">
<StackPanel Orientation="Vertical" Margin="0,5,0,0">
<WrapPanel >
<Button Content="解锁"
Command="{Binding UnlockCommand}" />
<Button Content="加锁"
Command="{Binding LockCommand}" />
<Button Content="单独任务"
Command="{Binding TakeOffCommand}" />
<Button Content="抛物"
Command="{Binding ThrowoutCommand}" />
</WrapPanel>
<WrapPanel>
<Button Content="起飞"
Command="{Binding GuidAsyncCommand}" />
<Button Content="悬停"
Command="{Binding HoverCommand}" />
<Button Content="手动"
Command="{Binding FloatCommand}" />
<Button Content="返航"
Command="{Binding ReturnToLaunchCommand}" />
<Button Content="降落"
Command="{Binding LandCommand}" />
<Button Content="跳过" Visibility="Collapsed"
Command="{Binding FlagCommand}" />
<TextBox Width="50"
Visibility="Collapsed"
Text="{Binding AltP, UpdateSourceTrigger=PropertyChanged}" />
</WrapPanel>
<WrapPanel>
<Button Content="闪灯"
Command="{Binding LEDFlickerCommand}" />
<Button Content="测试" Visibility="Collapsed"
Command="{Binding TestCommand}" />
<Button Content="开灯"
Command="{Binding LEDOnOffCommand}"
CommandParameter="0"/>
<Button Content="关灯"
Command="{Binding LEDOnOffCommand}"
CommandParameter="1"/>
<TextBlock Margin="8,-3,5,0" Text="起飞高度" VerticalAlignment="Center"/>
<TextBox VerticalContentAlignment="Center" Margin="0,0,0,5" Width="30" Height="25" Text="{Binding TaskOffAlt}" />
<TextBlock Margin="5,-3,5,0" Text="米" VerticalAlignment="Center"/>
</WrapPanel>
</StackPanel>
</TabItem>
<TabItem Header="任务控制">
<StackPanel Orientation="Vertical" Margin="0,5,0,0">
<WrapPanel>
<Button Content="全部解锁"
Command="{Binding UnlockAllCommand}"
IsEnabled="{Binding AllowMissionStart, UpdateSourceTrigger=PropertyChanged}" />
<Button Content="全部加锁"
Command="{Binding LockAllCommand}" />
</WrapPanel>
<WrapPanel>
<Button Content="开始任务"
Command="{Binding MissionStartCommand}"
IsEnabled="{Binding AllowMissionStart, UpdateSourceTrigger=PropertyChanged}"/>
<Button Content="暂停任务"
Command="{Binding MissionPauseCommand}" />
<Button Content="继续任务"
Command="{Binding MissionResumeCommand}" />
</WrapPanel>
<WrapPanel>
<Button Content="全部降落"
Command="{Binding AllLandCommand}" />
<Button Content="紧急返航"
Command="{Binding EmergencyRetCommand}" />
<Button Content="重设任务"
Command="{Binding ResetRealMissionCommand}" />
</WrapPanel>
</StackPanel>
</TabItem>
<TabItem Header="飞行报告" Visibility="Collapsed">
<StackPanel Orientation="Vertical" Margin="0,5,0,0">
<WrapPanel>
<Button Content="添加报告"
Command="{Binding UnlockAllCommand}"
IsEnabled="{Binding AllowMissionStart, UpdateSourceTrigger=PropertyChanged}" />
<Button Content="查看报告"
Command="{Binding LockAllCommand}" />
</WrapPanel>
</StackPanel>
</TabItem>
</TabControl>
</StackPanel>
</UserControl>