From 77afef5ee17c7f37924f59ae7f5f5c72515a76fb Mon Sep 17 00:00:00 2001 From: xu Date: Sat, 27 Apr 2024 15:33:11 +0800 Subject: [PATCH] =?UTF-8?q?RTCM=E5=8F=91=E9=80=81=E4=B8=AD=E9=81=87?= =?UTF-8?q?=E5=88=B0=E7=AB=AF=E5=8F=A3=E8=A2=AB=E5=85=B3=E9=97=AD=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5=EF=BC=8C=E8=87=AA=E5=8A=A8=E5=86=8D=E6=AC=A1?= =?UTF-8?q?=E6=89=93=E5=BC=80=EF=BC=8C=E8=B5=B0=E8=99=9A=E6=8B=9F=E5=9F=BA?= =?UTF-8?q?=E7=AB=99=E7=BB=8F=E5=B8=B8=E6=9C=89=E8=BF=99=E7=A7=8D=E6=83=85?= =?UTF-8?q?=E5=86=B5=EF=BC=8830=E5=88=86=E9=92=9F=E8=A2=AB=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=99=A8=E6=96=AD=E5=BC=80=E4=B8=80=E6=AC=A1=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Plane.FormationCreator/Formation/RtcmManager.cs | 16 ++++++++++++++-- .../Plane.FormationCreator.csproj | 1 + Plane.FormationCreator/Views/RtcmInfoView.xaml | 8 ++++---- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Plane.FormationCreator/Formation/RtcmManager.cs b/Plane.FormationCreator/Formation/RtcmManager.cs index 601c936..9e77822 100644 --- a/Plane.FormationCreator/Formation/RtcmManager.cs +++ b/Plane.FormationCreator/Formation/RtcmManager.cs @@ -9,6 +9,7 @@ using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics; using System.Linq; using System.Text; using System.Threading; @@ -406,6 +407,7 @@ namespace Plane.FormationCreator.Formation bool Ensend = false; //新版本打包发送模式 //await _commModuleManager.StartRtcmLoop(); + Plane.Windows.Messages.Message.Show("RTCM发送开始............"); while (Rtcmthreadrun) { // Console.WriteLine(string.Format("{0:T} 1", DateTime.Now)); @@ -424,6 +426,7 @@ namespace Plane.FormationCreator.Formation { comPort.Close(); comPort.Open(); + Plane.Windows.Messages.Message.Show("RTCM数据超时或端口被关闭,重新打开"); } // reset timer lastrecv = unow; @@ -433,7 +436,9 @@ namespace Plane.FormationCreator.Formation if (!comPort.IsOpen) { - return; + comPort.Open(); + Plane.Windows.Messages.Message.Show("RTCM端口已被关闭,再次打开"); + // return; } /////////////////////////////////重写发送RTCM数据部分---23/10/18 by panxu /// @@ -577,9 +582,16 @@ namespace Plane.FormationCreator.Formation } catch (Exception ex) { - Plane.Windows.Messages.Message.Show(ex.Message); + //Plane.Windows.Messages.Message.Show("RTCM异常:" + ex.Message); + /* + StackFrame sf = new System.Diagnostics.StackTrace(ex, true).GetFrame(0); + Plane.Windows.Messages.Message.Show("RTCM异常:"+ ex.Message+" 行:" + + sf.GetFileLineNumber() + " 文件:"+ sf.GetFileName()); + */ } } + Plane.Windows.Messages.Message.Show("RTCM发送停止............"); + Rtcmthreadrun = false; } diff --git a/Plane.FormationCreator/Plane.FormationCreator.csproj b/Plane.FormationCreator/Plane.FormationCreator.csproj index 8f5af26..1be2103 100644 --- a/Plane.FormationCreator/Plane.FormationCreator.csproj +++ b/Plane.FormationCreator/Plane.FormationCreator.csproj @@ -53,6 +53,7 @@ TRACE prompt 4 + bin\Release\FGCS.xml gcs.ico diff --git a/Plane.FormationCreator/Views/RtcmInfoView.xaml b/Plane.FormationCreator/Views/RtcmInfoView.xaml index 1ef0670..35b8151 100644 --- a/Plane.FormationCreator/Views/RtcmInfoView.xaml +++ b/Plane.FormationCreator/Views/RtcmInfoView.xaml @@ -20,18 +20,18 @@ Margin="10" ItemsSource="{Binding serialPorts, Mode=OneWay}" SelectedValue="{Binding SerialPortsSelectdValue}" DropDownOpened="ComboBox_DropDownOpened"/> -