diff --git a/Plane.FormationCreator/ViewModels/ControlPanelViewModel.cs b/Plane.FormationCreator/ViewModels/ControlPanelViewModel.cs index 77be4e4..55df10e 100644 --- a/Plane.FormationCreator/ViewModels/ControlPanelViewModel.cs +++ b/Plane.FormationCreator/ViewModels/ControlPanelViewModel.cs @@ -1333,6 +1333,14 @@ namespace Plane.FormationCreator.ViewModels Alert.Show("作为参照的原点未设置,无法写入相对位置!", "提示"); return; } + var _RtcmInfoViewModel = ServiceLocator.Current.GetInstance(); + if (_RtcmInfoViewModel.RtcmManager.Rtcmthreadrun) + { + Alert.Show("RTK数据正在发送,将自动关闭!", "提示"); + await _RtcmInfoViewModel.RtcmManager.Close(); + } + + int taskcount = _flightTaskManager.Tasks.Count; if (taskcount < 2) return; foreach (var copter in _copterManager.AcceptingControlCopters) @@ -1358,6 +1366,13 @@ namespace Plane.FormationCreator.ViewModels Alert.Show("作为参照的原点未设置,无法写入相对位置!", "提示"); return; } + var _RtcmInfoViewModel = ServiceLocator.Current.GetInstance(); + if (_RtcmInfoViewModel.RtcmManager.Rtcmthreadrun) + { + Alert.Show("RTK数据正在发送,将自动关闭!", "提示"); + await _RtcmInfoViewModel.RtcmManager.Close(); + } + int coptercount = _copterManager.Copters.Count; int taskcount = _flightTaskManager.Tasks.Count; if (taskcount < 2) return;