添加当前航点 选中飞机的平移
隐藏了千寻的发送
This commit is contained in:
parent
be825a6065
commit
b836322a15
@ -109,7 +109,7 @@
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
|
||||
<Menu Name="otherWindows" Background="Transparent" VerticalAlignment="Center" Visibility="Collapsed">
|
||||
<Menu Name="otherWindows" Background="Transparent" VerticalAlignment="Center">
|
||||
<MenuItem Header="窗口" Margin="0,2,0,0" Foreground="#969696">
|
||||
<CheckBox Content="属性设置" Margin="0,8,0,8" IsChecked="False" Click="btnAttribute_Click"/>
|
||||
<CheckBox Content="分组设置" Margin="0,8,0,8" IsChecked="False" Click="btnGroup_Click"/>
|
||||
|
@ -366,7 +366,7 @@ namespace Plane.FormationCreator.ViewModels
|
||||
return _GuidAsyncCommand ?? (_GuidAsyncCommand = new RelayCommand(async () =>
|
||||
{
|
||||
if (_copterManager.AcceptingControlCopters != null && _copterManager.AcceptingControlCopters.Count() > 0)
|
||||
await _commModuleManager.TakeOffAsync(1, _copterManager.AcceptingControlCopters);
|
||||
await _commModuleManager.TakeOffAsync(10, _copterManager.AcceptingControlCopters);
|
||||
/*
|
||||
await Task.WhenAll(_copterManager.AcceptingControlCopters.Select(async c =>
|
||||
{
|
||||
|
@ -214,6 +214,13 @@ namespace Plane.FormationCreator.ViewModels
|
||||
set { Set(nameof(StaggerRoutes), ref _StaggerRoutes, value); }
|
||||
}
|
||||
|
||||
private bool _OnlySelected = false;
|
||||
public bool OnlySelected
|
||||
{
|
||||
get { return _OnlySelected; }
|
||||
set { Set(nameof(OnlySelected), ref _OnlySelected, value); }
|
||||
}
|
||||
|
||||
//调整所有任务经度
|
||||
private ICommand _ModiAllPosCommand;
|
||||
public ICommand ModiAllPosCommand
|
||||
@ -1188,6 +1195,61 @@ public ICommand VerticlAlignmentCommand
|
||||
}
|
||||
}
|
||||
|
||||
//当前任务选中的飞机修改高度
|
||||
private ICommand _ModiSelectedAltCommand;
|
||||
public ICommand ModiSelectedAltCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return _ModiSelectedAltCommand ?? (_ModiSelectedAltCommand = new RelayCommand<double>(async =>
|
||||
{
|
||||
if (_flightTaskManager.Tasks.Count < 2) return;
|
||||
if (_flightTaskManager.SelectedTask.TaskType != FlightTaskType.FlyTo) return;
|
||||
for (int i = 0; i < _flightTaskManager.SelectedTask.SingleCopterInfos.Count; i++)
|
||||
{
|
||||
var info = _flightTaskManager.SelectedTask.SingleCopterInfos[i];
|
||||
if (_copterManager.SelectedCopters.Contains(info.Copter))
|
||||
{
|
||||
info.TargetAlt += Modialtvalue;
|
||||
}
|
||||
}
|
||||
|
||||
}));
|
||||
}
|
||||
}
|
||||
//当前任务选中的飞机水平移动
|
||||
private ICommand _ModiSelectedPosCommand;
|
||||
public ICommand ModiSelectedPosCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return _ModiSelectedPosCommand ?? (_ModiSelectedPosCommand = new RelayCommand<double>(async =>
|
||||
{
|
||||
if (_flightTaskManager.Tasks.Count < 2) return;
|
||||
if (_flightTaskManager.SelectedTask.TaskType != FlightTaskType.FlyTo) return;
|
||||
for (int i = 0; i < _flightTaskManager.SelectedTask.SingleCopterInfos.Count; i++)
|
||||
{
|
||||
var info = _flightTaskManager.SelectedTask.SingleCopterInfos[i];
|
||||
if (_copterManager.SelectedCopters.Contains(info.Copter))
|
||||
{
|
||||
Tuple<double, double> targetLatLng = new Tuple<double, double>(0, 0);
|
||||
|
||||
targetLatLng = GeographyUtils.CalcLatLngSomeMetersAway2D(
|
||||
info.TargetLat,
|
||||
info.TargetLng,
|
||||
directionvalue,
|
||||
Modialtvalue
|
||||
);
|
||||
info.TargetLat = targetLatLng.Item1;
|
||||
info.TargetLng = targetLatLng.Item2;
|
||||
}
|
||||
}
|
||||
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//调整所有任务高度
|
||||
private ICommand _ModiAltCommand;
|
||||
public ICommand ModiAltCommand
|
||||
|
@ -87,7 +87,8 @@
|
||||
<Button Content="统计模块"
|
||||
Command="{Binding DetectionCommModuleVersion}" />
|
||||
<Button Content="正式灯光"
|
||||
Command="{Binding TurnOffTestLightsCommand}" />
|
||||
Command="{Binding TurnOffTestLightsCommand}"
|
||||
Visibility="Collapsed"/>
|
||||
<Label Visibility="Collapsed">Lat</Label>
|
||||
<TextBox Visibility="Collapsed" Text="{Binding LatOffset}" Width="50"/>
|
||||
<Label Visibility="Collapsed">Lng</Label>
|
||||
@ -139,7 +140,7 @@
|
||||
|
||||
<Button Content="{Binding Path=NTRIPbtntxt}"
|
||||
Command="{Binding SendRTCMCommand}"
|
||||
/>
|
||||
Visibility="Collapsed"/>
|
||||
<TextBlock
|
||||
Margin="5,5,5,5"
|
||||
Text="{Binding Path=RTKState}"
|
||||
|
@ -163,18 +163,19 @@
|
||||
Command="{Binding ModiAllPosCommand}" />
|
||||
<TextBox
|
||||
Grid.Column="1"
|
||||
Width="40"
|
||||
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="35"
|
||||
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" />
|
||||
|
Loading…
Reference in New Issue
Block a user