diff --git a/Plane.FormationCreator/ViewModels/ControlPanelViewModel.cs b/Plane.FormationCreator/ViewModels/ControlPanelViewModel.cs index 74bb998..d3178a9 100644 --- a/Plane.FormationCreator/ViewModels/ControlPanelViewModel.cs +++ b/Plane.FormationCreator/ViewModels/ControlPanelViewModel.cs @@ -238,6 +238,9 @@ namespace Plane.FormationCreator.ViewModels if (_copterManager.Copters.Count > 0) { Dictionary> GPSTypes = new Dictionary>(); + + Dictionary> Heading = new Dictionary>(); + foreach (var copter in _copterManager.Copters) { string name = copter.Name; @@ -249,12 +252,37 @@ namespace Plane.FormationCreator.ViewModels } else GPSTypes[copter.GpsFixType.ToString()].Add(name); + + + + + if (!Heading.Keys.Contains(copter.Heading.ToString())) + { + List copterNames = new List(); + copterNames.Add(name); + Heading.Add(copter.Heading.ToString(), copterNames); + } + else + Heading[copter.Heading.ToString()].Add(name); + + } + Message.Show($"==定位状态=="); foreach (var item in GPSTypes) { Message.Show($"{item.Key}:{string.Join(",", item.Value)}"); + Message.Show($"------------"); } + Message.Show($"==机头方向=="); + + foreach (var item in Heading) + { + Message.Show($"{item.Key} 度:{string.Join(",", item.Value)}"); + Message.Show($"------------"); + + } + } await Task.Delay(10); })); diff --git a/Plane.FormationCreator/Views/ControlPanelView.xaml b/Plane.FormationCreator/Views/ControlPanelView.xaml index c6b5049..94ce4ef 100644 --- a/Plane.FormationCreator/Views/ControlPanelView.xaml +++ b/Plane.FormationCreator/Views/ControlPanelView.xaml @@ -55,7 +55,7 @@ Command="{Binding ParamModify}" />