From 3a8e82a48157683390409fd5a3e330ed3e6ae469 Mon Sep 17 00:00:00 2001 From: TunaLobster Date: Tue, 28 Sep 2021 17:25:22 -0500 Subject: [PATCH] LogSort: Add sorting by BRD_SER_NUM --- ExtLibs/Utilities/LogSort.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ExtLibs/Utilities/LogSort.cs b/ExtLibs/Utilities/LogSort.cs index a294b97064..3bcf6e64cb 100644 --- a/ExtLibs/Utilities/LogSort.cs +++ b/ExtLibs/Utilities/LogSort.cs @@ -68,6 +68,7 @@ public static void SortLogs(string[] logs, string masterdestdir = "") bool issitl = false; var sysid = 0; var compid = 0; + var brdsernum = 0; var aptype = MAVLink.MAV_TYPE.GENERIC; var packetsseen = 0; @@ -78,8 +79,10 @@ public static void SortLogs(string[] logs, string masterdestdir = "") //PARM, 68613507, SYSID_THISMAV, 1 var sysidlist = logBuffer.GetEnumeratorType("PARM").Where(a => a["Name"] == "SYSID_THISMAV"); + var brdsernumlist = logBuffer.GetEnumeratorType("PARM").Where(a => a["Name"] == "BRD_SERIAL_NUM"); sysid = int.Parse(sysidlist.First()["Value"].ToString()); + brdsernum = int.Parse(brdsernumlist.First()["Value"].ToString()); //logBuffer.dflog @@ -90,7 +93,8 @@ public static void SortLogs(string[] logs, string masterdestdir = "") var destdir = masterdestdir + Path.DirectorySeparatorChar + "SITL" + Path.DirectorySeparatorChar + aptype.ToString() + Path.DirectorySeparatorChar - + sysid + Path.DirectorySeparatorChar; + + sysid + Path.DirectorySeparatorChar + + brdsernum + Path.DirectorySeparatorChar; if (!Directory.Exists(destdir))