diff --git a/src/SharpBladeFlightAnalyzer/Controls/LogPageControl.xaml b/src/SharpBladeFlightAnalyzer/Controls/LogPageControl.xaml index d8445e3..fd1d627 100644 --- a/src/SharpBladeFlightAnalyzer/Controls/LogPageControl.xaml +++ b/src/SharpBladeFlightAnalyzer/Controls/LogPageControl.xaml @@ -255,20 +255,35 @@ + + + - - + + + + + + + + diff --git a/src/SharpBladeFlightAnalyzer/Controls/LogPageControl.xaml.cs b/src/SharpBladeFlightAnalyzer/Controls/LogPageControl.xaml.cs index 11d4f48..984e0fd 100644 --- a/src/SharpBladeFlightAnalyzer/Controls/LogPageControl.xaml.cs +++ b/src/SharpBladeFlightAnalyzer/Controls/LogPageControl.xaml.cs @@ -254,7 +254,7 @@ private void exportAcmiBtn_Click(object sender, RoutedEventArgs e) (logFile.FormatList["vehicle_attitude"].SubscribedID.Count == 0) ) { - MessageBox.Show("数据不全"); + MessageBox.Show("数据不全", "SharpBladeFlightAnalyzer"); return; } DataField[] posData = new DataField[3]; @@ -359,7 +359,7 @@ private void exportCsvBtn_Click(object sender, RoutedEventArgs e) (logFile.FormatList["vehicle_attitude"].SubscribedID.Count == 0) ) { - MessageBox.Show("数据不全"); + MessageBox.Show("数据不全", "SharpBladeFlightAnalyzer"); return; } DataField[] posData = new DataField[3]; diff --git a/src/SharpBladeFlightAnalyzer/LoggedMessage.cs b/src/SharpBladeFlightAnalyzer/LoggedMessage.cs index 5f69b9f..a9f0077 100644 --- a/src/SharpBladeFlightAnalyzer/LoggedMessage.cs +++ b/src/SharpBladeFlightAnalyzer/LoggedMessage.cs @@ -12,6 +12,7 @@ public class LoggedMessage ulong timestamp; string message; DateTime time; + LogTag tag; public LogLevel Level { @@ -39,6 +40,23 @@ public DateTime Time { get { return time; } } + + public LogTag Tag { get => tag; set => tag = value; } + + public string TagString + { + get + { + if (Tag != LogTag.notag) + return tag.ToString(); + return ""; + } + } + + public LoggedMessage() + { + tag = LogTag.notag; + } } public enum LogLevel:byte @@ -52,4 +70,19 @@ public enum LogLevel:byte INFO = 0x36, DEBUG = 0x37 } + + public enum LogTag : ushort + { + unassigned, + mavlink_handler, + ppk_handler, + camera_handler, + ptp_handler, + serial_handler, + watchdog, + io_service, + cbuf, + ulg, + notag=9999 + } } diff --git a/src/SharpBladeFlightAnalyzer/MainWindow.xaml b/src/SharpBladeFlightAnalyzer/MainWindow.xaml index 6dfd7b0..ba680e6 100644 --- a/src/SharpBladeFlightAnalyzer/MainWindow.xaml +++ b/src/SharpBladeFlightAnalyzer/MainWindow.xaml @@ -75,7 +75,9 @@ -