写入航点时停止发送RTK
调整按钮位置,分开选中和整体的操作 修改电压后面信息无法显示的bug 加入显示所有航点功能
This commit is contained in:
parent
8facb729f7
commit
84c12a1eb7
@ -758,7 +758,7 @@ namespace Plane.FormationCreator.ViewModels
|
||||
return _TurnOffTestLightsCommand ?? (_TurnOffTestLightsCommand = new RelayCommand(async () =>
|
||||
{
|
||||
int num = 0;
|
||||
//var o = new { NTF_G_RTLOFF = 1 };
|
||||
//正式飞行
|
||||
num = await _commModuleManager.SetMultipleParamAsync(
|
||||
"NTF_G_RTLOFF", "1",
|
||||
"FS_GCS_ENABLE", "0",
|
||||
@ -766,7 +766,27 @@ namespace Plane.FormationCreator.ViewModels
|
||||
"WAYPOINT_GLED", "0",
|
||||
"FS_BATT_VOLTAGE", "14.2",
|
||||
"RTL_ALT","3000",
|
||||
"RTL_ALT_MAX","5000");
|
||||
"RTL_ALT_MAX","5000",
|
||||
"FC_LOG_LEVEL", "0",
|
||||
"FC_LOG_TYPE", "0",
|
||||
"FS_GPS_RTL", "4");
|
||||
|
||||
//测试飞行
|
||||
/*
|
||||
num = await _commModuleManager.SetMultipleParamAsync(
|
||||
"NTF_G_RTLOFF", "0",
|
||||
"FS_GCS_ENABLE", "1",
|
||||
"NTF_G_RTKTEST", "1",
|
||||
"WAYPOINT_GLED", "1",
|
||||
"FS_BATT_VOLTAGE", "14.2",
|
||||
"RTL_ALT", "3000",
|
||||
"RTL_ALT_MAX", "5000",
|
||||
"FC_LOG_LEVEL","3",
|
||||
"FC_LOG_TYPE", "1",
|
||||
"FS_GPS_RTL", "4"
|
||||
);
|
||||
*/
|
||||
|
||||
Alert.Show($"广播完成! 当前序列号:{num}");
|
||||
}));
|
||||
}
|
||||
@ -1321,6 +1341,14 @@ namespace Plane.FormationCreator.ViewModels
|
||||
int taskcount = _flightTaskManager.Tasks.Count;
|
||||
if (taskcount < 2) return;
|
||||
|
||||
var _RtcmInfoViewModel = ServiceLocator.Current.GetInstance<RtcmInfoViewModel>();
|
||||
if (_RtcmInfoViewModel.RtcmManager.Rtcmthreadrun)
|
||||
{
|
||||
Alert.Show("RTK数据正在发送,将自动关闭!", "提示");
|
||||
await _RtcmInfoViewModel.RtcmManager.Close();
|
||||
}
|
||||
|
||||
Alert.Show("开始写入航点,请稍等!", "提示");
|
||||
_commModuleManager.ClearMissionWriteState();
|
||||
for (int i = 0; i < coptercount; i++)
|
||||
{
|
||||
|
@ -184,7 +184,12 @@ namespace Plane.FormationCreator.ViewModels
|
||||
set { Set(nameof(directionvalue), ref _directionvalue, value); }
|
||||
}
|
||||
|
||||
|
||||
private float _directionvalueall = 0;
|
||||
public float directionvalueall
|
||||
{
|
||||
get { return _directionvalueall; }
|
||||
set { Set(nameof(directionvalueall), ref _directionvalueall, value); }
|
||||
}
|
||||
|
||||
private double _FlyToLat;
|
||||
public double FlyToLat
|
||||
@ -221,13 +226,35 @@ namespace Plane.FormationCreator.ViewModels
|
||||
set { Set(nameof(OnlySelected), ref _OnlySelected, value); }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private ICommand _ShowallTaskpointCommand;
|
||||
public ICommand ShowallTaskpointCommand
|
||||
|
||||
{
|
||||
get
|
||||
{
|
||||
return _ShowallTaskpointCommand ?? (_ShowallTaskpointCommand = new RelayCommand<float>(async =>
|
||||
{
|
||||
MapManager _mapManager = Microsoft.Practices.ServiceLocation.ServiceLocator.Current.GetInstance<MapManager>();
|
||||
_mapManager.MapView.ShowAllWaypoint();
|
||||
|
||||
//_flightTaskManager.SelectedTask = null;
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
//调整所有任务经度
|
||||
private ICommand _ModiAllPosCommand;
|
||||
public ICommand ModiAllPosCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return _ModiAllPosCommand ?? (_ModiAllPosCommand = new RelayCommand<double>(async =>
|
||||
return _ModiAllPosCommand ?? (_ModiAllPosCommand = new RelayCommand<float>( cModialtvalue =>
|
||||
{
|
||||
if (_flightTaskManager.Tasks.Count < 2) return;
|
||||
|
||||
@ -259,14 +286,14 @@ namespace Plane.FormationCreator.ViewModels
|
||||
targetLatLng = GeographyUtils.CalcLatLngSomeMetersAway2D(
|
||||
_flightTaskManager.Tasks[i].SingleCopterInfos[j].TargetLat,
|
||||
_flightTaskManager.Tasks[i].SingleCopterInfos[j].TargetLng,
|
||||
directionvalue,
|
||||
Modialtvalue
|
||||
directionvalueall,
|
||||
cModialtvalue
|
||||
);
|
||||
_flightTaskManager.Tasks[i].SingleCopterInfos[j].TargetLat = targetLatLng.Item1;
|
||||
_flightTaskManager.Tasks[i].SingleCopterInfos[j].TargetLng = targetLatLng.Item2;
|
||||
}
|
||||
}
|
||||
Alert.Show("指定步骤任务位置已向" + directionvalue + "度改变" + Modialtvalue + "米,注意是否有障碍物!");
|
||||
Alert.Show("指定步骤任务位置已向" + directionvalueall + "度改变" + cModialtvalue + "米,注意是否有障碍物!");
|
||||
|
||||
}));
|
||||
}
|
||||
@ -1402,7 +1429,7 @@ public ICommand VerticlAlignmentCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return _ModiAltCommand ?? (_ModiAltCommand = new RelayCommand<double>(async =>
|
||||
return _ModiAltCommand ?? (_ModiAltCommand = new RelayCommand<double>( cModialtvalue =>
|
||||
{
|
||||
if (_flightTaskManager.Tasks.Count < 2) return;
|
||||
|
||||
@ -1429,7 +1456,7 @@ public ICommand VerticlAlignmentCommand
|
||||
|
||||
for (int j = 0; j < _flightTaskManager.Tasks[i].SingleCopterInfos.Count; j++)
|
||||
{
|
||||
_flightTaskManager.Tasks[i].SingleCopterInfos[j].TargetAlt += Modialtvalue;
|
||||
_flightTaskManager.Tasks[i].SingleCopterInfos[j].TargetAlt +=(float) cModialtvalue;
|
||||
if (lowalt > _flightTaskManager.Tasks[i].SingleCopterInfos[j].TargetAlt)
|
||||
{
|
||||
lowalt = _flightTaskManager.Tasks[i].SingleCopterInfos[j].TargetAlt;
|
||||
@ -1438,7 +1465,7 @@ public ICommand VerticlAlignmentCommand
|
||||
}
|
||||
}
|
||||
}
|
||||
Alert.Show("指定步骤任务高度已改变"+ Modialtvalue + "米,步骤["+ lowtask + "],ID["+
|
||||
Alert.Show("指定步骤任务高度已改变"+ cModialtvalue + "米,步骤["+ lowtask + "],ID["+
|
||||
_flightTaskManager.Tasks[lowtask].SingleCopterInfos[lowCopter].Copter.Id
|
||||
+ "]最低飞行高度"+ lowalt + "米,注意是否太低!");
|
||||
|
||||
|
@ -292,16 +292,24 @@
|
||||
|
||||
<StackPanel>
|
||||
<TextBlock Text="电压:" />
|
||||
<Slider Style="{StaticResource Slider_CustomStyle}" x:Name="sldChannel3"
|
||||
Width="80"
|
||||
Minimum="12"
|
||||
Maximum="16.8"
|
||||
IsEnabled="False"
|
||||
Value="{Binding Path=Voltage}"
|
||||
<Slider x:Name="sldChannel3"
|
||||
Width="75"
|
||||
Minimum="1100"
|
||||
Maximum="1900"
|
||||
Value="{Binding Channel3, Mode=OneWay}"
|
||||
ValueChanged="sldChannel3_ValueChanged">
|
||||
|
||||
<Slider.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Blue.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Slider.Resources>
|
||||
</Slider>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="电压值:" />
|
||||
<TextBlock Text="{Binding Path=Voltage}" />
|
||||
|
@ -366,6 +366,19 @@ namespace Plane.FormationCreator.Views
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void ShowAllWaypoint()
|
||||
{
|
||||
|
||||
foreach (var item in _copterDrawings)
|
||||
{
|
||||
var copterDrawing = item.Value;
|
||||
copterDrawing.ShowAllWaypoint();
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearCopters()
|
||||
{
|
||||
/*
|
||||
|
@ -296,6 +296,8 @@ namespace Plane.FormationCreator.Views
|
||||
//this.Dot.Fill = _brush;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void ShowWaypoint(int taskIndex)
|
||||
{
|
||||
var wpIndex = taskIndex - 1; // Waypoints 中没有起飞点。
|
||||
@ -304,9 +306,6 @@ namespace Plane.FormationCreator.Views
|
||||
{
|
||||
_map.Markers.Remove(item);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (wpIndex >= 0 && wpIndex < Waypoints.Count)
|
||||
{
|
||||
|
||||
@ -317,9 +316,25 @@ namespace Plane.FormationCreator.Views
|
||||
_map.Markers.Add(wpmarker); //消耗大量时间费时
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void ShowAllWaypoint()
|
||||
{
|
||||
foreach (var item in this.Waypoints)
|
||||
{
|
||||
_map.Markers.Remove(item);
|
||||
}
|
||||
|
||||
foreach (var item in this.Waypoints)
|
||||
{
|
||||
_map.Markers.Add(item);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -334,7 +349,7 @@ namespace Plane.FormationCreator.Views
|
||||
marker.Shape = shapesContainer;
|
||||
|
||||
Waypoints.Add(marker);
|
||||
// _map.Markers.Add(marker); //消耗大量时间费时 ,为了提高效率改为选中才添加见ShowWaypoint
|
||||
//_map.Markers.Add(marker); //消耗大量时间费时 ,为了提高效率改为选中才添加见ShowWaypoint
|
||||
marker.ZIndex = 100;
|
||||
//MapLayer.SetZIndex(shapesContainer, 100);
|
||||
//var wpPos = _map.LocationToViewportPoint(location);
|
||||
|
@ -29,8 +29,8 @@
|
||||
<TextBlock Margin="5" Text="起飞任务" Height="20" VerticalAlignment="Center" />
|
||||
|
||||
|
||||
<Separator />
|
||||
<Grid DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}">
|
||||
<Separator Margin="5,0,5,0" />
|
||||
<Grid Margin="5" DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
@ -43,17 +43,17 @@
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Margin="5" Text="起飞延时"/>
|
||||
<TextBlock Margin="5" Text="起飞延时" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Margin="5" Grid.Column="2"
|
||||
Text="{Binding TakeOffWaitTime, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<Button Content="应用所选" Margin="5" Grid.Column="3"
|
||||
Command="{Binding SetSelTakeOffWaitCommand}"/>
|
||||
<Separator Grid.Row="1" Grid.ColumnSpan="4"/>
|
||||
<Separator Margin="5,5,5,5" Grid.Row="1" Grid.ColumnSpan="4"/>
|
||||
|
||||
<TextBlock Text="随机时间" Grid.Row="2"/>
|
||||
<TextBox Margin="10,0" Grid.Row="2" Grid.Column="1" Text="{Binding TakeOffMinTime}"/>
|
||||
<TextBox Margin="10,0" Grid.Row="2" Grid.Column="2" Text="{Binding TakeOffMaxTime}"/>
|
||||
<Button Margin="10,0" Content="应用所选" Grid.Row="2" Grid.Column="3"
|
||||
<TextBlock Margin="5" Text="随机时间" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Margin="5" Grid.Row="2" Grid.Column="1" Text="{Binding TakeOffMinTime}"/>
|
||||
<TextBox Margin="5" Grid.Row="2" Grid.Column="2" Text="{Binding TakeOffMaxTime}"/>
|
||||
<Button Margin="5" Content="应用所选" Grid.Row="2" Grid.Column="3"
|
||||
Command="{Binding SetRandomOffWaitDelayCommand}"/>
|
||||
</Grid>
|
||||
|
||||
@ -67,18 +67,34 @@
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<StackPanel>
|
||||
<TextBlock Margin="5" Text="航点任务 " VerticalAlignment="Center" />
|
||||
<Button Margin="5" Content="导入航点" Command="{Binding ImportWayPointCommand}"
|
||||
<TextBlock Margin="0,5,5,0" Text="所有:" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
<Button Margin="0,5,5,0" Content="导入航点" Command="{Binding ImportWayPointCommand}"
|
||||
Visibility="Collapsed"/>
|
||||
<Button Margin="5" Content="优化路线" Command="{Binding OptimizeRouteCommand}"
|
||||
<Button Margin="0,5,5,0" Content="优化路线" Width="105" Command="{Binding OptimizeRouteCommand}"
|
||||
/>
|
||||
<Button Margin="5" Content="导入航点" Command="{Binding ImportBlenderWayPointCommand}"/>
|
||||
<Button Margin="5" Content="导出航点" Command="{Binding ExportWayPointCommand}"/>
|
||||
<Button Margin="5" Content="估计时间" Command="{Binding AutoWayPointTmCommand}"/>
|
||||
<Button Margin="0,5,5,0" Content="导出到C4D" Width="105" Command="{Binding ExportWayPointCommand}"/>
|
||||
<Button Margin="0,5,5,0" Content="估计飞行时间" Width="105" Command="{Binding AutoWayPointTmCommand}"/>
|
||||
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
|
||||
<Button Content="回前一高度"
|
||||
Margin="40,5,5,0" Width="105"
|
||||
Command="{Binding PrealtCommand}" />
|
||||
<Button Content="回上一任务"
|
||||
Margin="0,5,5,0" Width="105"
|
||||
Command="{Binding BackToPreviousTaskPoint}" />
|
||||
<Button Content="回起飞点"
|
||||
Margin="0,5,5,0" Width="105"
|
||||
Command="{Binding BackTakeOffPointCommand}" />
|
||||
|
||||
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<Separator Margin="0,1"/>
|
||||
<Separator Margin="5,5,5,0" />
|
||||
<StackPanel>
|
||||
<TextBlock Text="选中:" Margin="0,5,5,0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
<Button Content="上边对齐"
|
||||
Margin="0,5,5,0"
|
||||
Command="{Binding LevelAlignmentCommand}" />
|
||||
@ -91,14 +107,12 @@
|
||||
<Button Content="垂直均分"
|
||||
Margin="0,5,5,0"
|
||||
Command="{Binding VerticlAverageCommand}" />
|
||||
<Button Content="回起飞点"
|
||||
Margin="0,5,5,0"
|
||||
Command="{Binding BackTakeOffPointCommand}" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel>
|
||||
<Button Content="水平旋转"
|
||||
Margin="0,5,5,0"
|
||||
Margin="40,5,5,0"
|
||||
Command="{Binding LevelRotateCommand}"
|
||||
CommandParameter="{Binding ElementName=txtAlignmentLine, Path=Text}"/>
|
||||
<Button Content="垂直旋转"
|
||||
@ -106,71 +120,63 @@
|
||||
Command="{Binding VerticlRotateCommand}"
|
||||
CommandParameter="{Binding ElementName=txtAlignmentLine, Path=Text}"/>
|
||||
|
||||
<Button Content="整体旋转"
|
||||
Margin="0,5,5,0"
|
||||
Command="{Binding TaskRotateCommand}"
|
||||
CommandParameter="{Binding ElementName=txtAlignmentLine, Path=Text}"/>
|
||||
|
||||
<TextBox x:Name="txtAlignmentLine"
|
||||
Width="35"
|
||||
Width="30"
|
||||
Margin="0,5,5,0"
|
||||
Text="0"
|
||||
VerticalContentAlignment="Center" />
|
||||
<TextBlock Text="度" Margin="0, 10, 5, 0"/>
|
||||
|
||||
<Button Content="回上一任务"
|
||||
Margin="0,5,5,0"
|
||||
Command="{Binding BackToPreviousTaskPoint}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel>
|
||||
<Button Content="缩放比例"
|
||||
VerticalContentAlignment="Center"
|
||||
HorizontalContentAlignment="Right"/>
|
||||
<TextBlock Text="度" Margin="0, 10, 5, 0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
<Button Content="调整大小"
|
||||
Margin="0,5,5,0"
|
||||
Command="{Binding ScaleCommand}"
|
||||
CommandParameter="{Binding ElementName=txtScaleVale, Path=Text}"/>
|
||||
|
||||
<TextBox x:Name="txtScaleVale"
|
||||
Width="35"
|
||||
Margin="0,5,5,0"
|
||||
Text="100"
|
||||
VerticalContentAlignment="Center" />
|
||||
<TextBlock Text="%" Margin="0, 10, 5, 0"/>
|
||||
<Button Content="最小距离"
|
||||
Width="30"
|
||||
Margin="0,5,5,0"
|
||||
VerticalContentAlignment="Center"
|
||||
HorizontalContentAlignment="Right" />
|
||||
<TextBlock Text="%" Margin="0, 10, 5, 0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
|
||||
|
||||
<StackPanel>
|
||||
<Button Content="调整高度"
|
||||
Margin="0,5,5,0"
|
||||
Command="{Binding ModiSelectedAltCommand}"/>
|
||||
<Button Content="移动航点"
|
||||
Margin="0,5,5,0"
|
||||
Command="{Binding ModiSelectedPosCommand}" />
|
||||
<TextBox
|
||||
Grid.Column="1"
|
||||
Width="30"
|
||||
Margin="0,5,5,0"
|
||||
VerticalContentAlignment="Center"
|
||||
HorizontalContentAlignment="Right"
|
||||
Text="{Binding Modialtvalue, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<TextBlock Text="米 方向" Margin="0, 10, 5, 0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Width="30"
|
||||
Margin="0,5,5,0"
|
||||
VerticalContentAlignment="Center"
|
||||
HorizontalContentAlignment="Right"
|
||||
Text="{Binding directionvalue, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<TextBlock Text="度" Margin="0, 10, 5, 0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<Button Content="最小点距"
|
||||
Margin="0,5,5,0"
|
||||
Command="{Binding calDistinceCommand}"/>
|
||||
<Button Content="最长航距"
|
||||
Margin="0,5,5,0"
|
||||
Command="{Binding MaxDistinceAndTimeCommand}"/>
|
||||
<Button Content="前一高度"
|
||||
Margin="0,5,5,0"
|
||||
Command="{Binding PrealtCommand}" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel>
|
||||
<Button Content="整体提高"
|
||||
Margin="0,5,5,0"
|
||||
Command="{Binding ModiAltCommand}"/>
|
||||
<Button Content="整体移动"
|
||||
Margin="0,5,5,0"
|
||||
Command="{Binding ModiAllPosCommand}" />
|
||||
<TextBox
|
||||
Grid.Column="1"
|
||||
Width="30"
|
||||
Margin="0, 5, 5, 0"
|
||||
HorizontalContentAlignment="Right"
|
||||
Text="{Binding Modialtvalue, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<TextBlock Text="米 方向" Margin="0, 10, 5, 0"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Width="30"
|
||||
Margin="0, 5, 5, 0"
|
||||
HorizontalContentAlignment="Right"
|
||||
Text="{Binding directionvalue, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<TextBlock Text="度" Margin="0, 10, 5, 0"/>
|
||||
<Button Content="提高" Margin="0,5,5,0" Command="{Binding ModiSelectedAltCommand}"/>
|
||||
<Button Content="移动" Margin="0,5,5,0" Command="{Binding ModiSelectedPosCommand}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Separator Margin="0,2" />
|
||||
<Separator Margin="0,5,5,0" />
|
||||
|
||||
|
||||
<Grid Margin="0,2"
|
||||
@ -189,33 +195,35 @@
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="纬度: " />
|
||||
<TextBlock Text="纬度: " VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Column="2"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="0,2,5,0"
|
||||
Margin="0,5,5,0"
|
||||
Text="{Binding TargetLat, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<TextBlock Grid.Row="1"
|
||||
<TextBlock Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
Text="经度: " />
|
||||
<TextBox Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="0,2,5,0"
|
||||
Margin="0,5,5,0"
|
||||
Text="{Binding TargetLng, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<TextBlock Grid.Row="2"
|
||||
<TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
Text="高度: " />
|
||||
<TextBox Grid.Row="2"
|
||||
Grid.Column="2"
|
||||
Margin="0,2,5,0"
|
||||
Margin="0,5,5,0"
|
||||
VerticalContentAlignment="Center"
|
||||
HorizontalContentAlignment="Left"
|
||||
Text="{Binding TargetAlt, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<Button Grid.Row="2"
|
||||
Content="应用到所选"
|
||||
Grid.Column="3" Margin="0,2,5,0"
|
||||
Grid.Column="3" Margin="0,5,5,0"
|
||||
Command="{Binding SetAllCopterAltCommand}"/>
|
||||
</Grid>
|
||||
<Separator Margin="0,2"/>
|
||||
<Separator Margin="0,5,5,5"/>
|
||||
<Grid Margin="0,2,0,0"
|
||||
DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}"
|
||||
IsEnabled="{Binding CanModifySingleCopterInfo}" >
|
||||
@ -230,7 +238,7 @@
|
||||
|
||||
|
||||
</Grid>
|
||||
<Separator/>
|
||||
<Separator Margin="0,5,5,5" />
|
||||
<Grid Margin="0,2"
|
||||
DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}"
|
||||
IsEnabled="{Binding CanModifySingleCopterInfo}" >
|
||||
@ -246,13 +254,13 @@
|
||||
<CheckBox Content="改变速度" Margin="0,2"
|
||||
IsChecked="{Binding IsChangeSpeed, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<StackPanel Margin="0,0" Grid.Column="1">
|
||||
<TextBlock Text="水平" Margin="0,0,5,5" VerticalAlignment ="Center" />
|
||||
<TextBlock Text="水平" Margin="0,0,5,5" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Width="45" Margin="5,0,5,5" VerticalAlignment ="Center"
|
||||
Text="{Binding LevelSpeed, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<TextBlock Text="上升" Margin="0,0,5,5" VerticalAlignment ="Center" />
|
||||
<TextBlock Text="上升" Margin="0,0,5,5" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Width="45" Margin="5,0,0,5" VerticalAlignment="Center"
|
||||
Text="{Binding UpSpeed, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<TextBlock Text="下降" Margin="5,0,0,5" VerticalAlignment ="Center" />
|
||||
<TextBlock Text="下降" Margin="5,0,0,5" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Width="45" Margin="5,0,5,5" VerticalAlignment="Center"
|
||||
Text="{Binding DownSpeed, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
</StackPanel>
|
||||
@ -269,9 +277,9 @@
|
||||
Value="Horizontal" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<TextBlock Margin="5" Text="降落任务" VerticalAlignment="Center" />
|
||||
<Separator/>
|
||||
<Grid DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}"
|
||||
<TextBlock Margin="5" Text="降落任务" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<Separator Margin="5,0,5,5" />
|
||||
<Grid Margin="5" DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}"
|
||||
IsEnabled="{Binding CanModifySingleCopterInfo}" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
@ -279,7 +287,7 @@
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="5" Text="降落延时"/>
|
||||
<TextBlock Margin="5" Text="降落延时" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
|
||||
<TextBox Margin="5" Grid.Column="2"
|
||||
Text="{Binding LandWaitTime, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
@ -325,7 +333,7 @@
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
<Separator/>
|
||||
<Separator Margin="5,5,5,5" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="5,7,0,0" Text="时间"/>
|
||||
<TextBox Margin="5,5,0,3" Width="30" Text="{Binding GradientRampTime}"/>
|
||||
@ -336,7 +344,7 @@
|
||||
<Button Margin="10,5,0,3" Width="120" Content="设置渐变灯"
|
||||
Command="{Binding SetGradientRampCommand}" />
|
||||
</StackPanel>
|
||||
<Separator/>
|
||||
<Separator Margin="5,5,5,5" />
|
||||
</StackPanel>
|
||||
<StackPanel DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}">
|
||||
<Grid >
|
||||
@ -442,13 +450,78 @@
|
||||
|
||||
<StackPanel x:Name="PanelDesign1">
|
||||
<StackPanel Orientation="Horizontal" Margin="0,5,0,5" >
|
||||
<Button Width="120" Margin="10,5,0,5" Content="C4D导入航点" Command="{Binding ImportBlenderWayPointCommand}"/>
|
||||
<Button Width="120" Content="自动飞行时间" Margin="10,5,0,5"
|
||||
Command="{Binding AutoWayPointAllTmCommand}" HorizontalAlignment="Right" Height="26"/>
|
||||
Command="{Binding AutoWayPointAllTmCommand}" HorizontalAlignment="Right" />
|
||||
<Button Width="120" Content="飞行图案设计" Margin="10,5,0,5"
|
||||
Command="{Binding SetHorseRaceLampCommand}" HorizontalAlignment="Right" Height="26"/>
|
||||
</StackPanel>
|
||||
<Separator/>
|
||||
<Separator Margin="5,0,5,0" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel x:Name="PanelDesign2">
|
||||
<StackPanel Orientation="Horizontal" Margin="0,5,0,5" >
|
||||
<Button Content="整体旋转" Width="120"
|
||||
Margin="10,5,0,5" Height="26"
|
||||
Command="{Binding TaskRotateCommand}"
|
||||
CommandParameter="{Binding ElementName=txtAlignmentLine1, Path=Text}"/>
|
||||
<TextBox x:Name="txtAlignmentLine1"
|
||||
Width="120"
|
||||
Margin="10,5,0,5" Height="26"
|
||||
Text="0"
|
||||
VerticalContentAlignment="Center" />
|
||||
<TextBlock Text="度" Margin="10, 10, 5, 0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,5" >
|
||||
|
||||
<Button Content="整体调整高度"
|
||||
Width="120"
|
||||
Margin="10,5,0,5" Height="26"
|
||||
Command="{Binding ModiAltCommand}"
|
||||
CommandParameter="{Binding ElementName=txtModialtvalue, Path=Text}"
|
||||
/>
|
||||
<Button Content="整体移动"
|
||||
Width="120"
|
||||
Margin="10,5,0,5" Height="26"
|
||||
Command="{Binding ModiAllPosCommand}"
|
||||
CommandParameter="{Binding ElementName=txtModialtvalue, Path=Text}"
|
||||
/>
|
||||
|
||||
<TextBox x:Name="txtModialtvalue"
|
||||
Grid.Column="1"
|
||||
Width="35"
|
||||
Margin="10,5,0,5" Height="26"
|
||||
HorizontalContentAlignment="Right"
|
||||
Text="0"/>
|
||||
<TextBlock Text="米 方向" Margin="5, 10, 5, 0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Column="1" x:Name="txtdirectionvalue"
|
||||
Width="35"
|
||||
Margin="0,5,0,5" Height="26"
|
||||
HorizontalContentAlignment="Right"
|
||||
Text="{Binding directionvalueall, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<TextBlock Text="度" Margin="5, 10, 5, 0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
|
||||
|
||||
</StackPanel>
|
||||
<Separator Margin="5,0,5,0" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,5" >
|
||||
|
||||
<Button Content="显示所有航点" Width="120"
|
||||
Margin="10,5,0,5" Height="26"
|
||||
Command="{Binding ShowallTaskpointCommand}"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</StackPanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
xmlns:c="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="800"
|
||||
Height="350" Width="1500" WindowStartupLocation="CenterScreen" Background="#FF2D2D2D" BorderBrush="#FF039AF0" Title="RTK控制">
|
||||
Height="350" Width="1500" WindowStartupLocation="CenterScreen" Background="#FF2D2D2D" BorderBrush="#FF039AF0" Title="RTK控制" ResizeMode="NoResize" Topmost="True">
|
||||
<Grid Margin="0,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
|
Loading…
Reference in New Issue
Block a user