Skip to content

Commit

Permalink
LogSort: Add sorting by BRD_SER_NUM
Browse files Browse the repository at this point in the history
  • Loading branch information
TunaLobster authored and meee1 committed Oct 3, 2023
1 parent dedc9ef commit 3a8e82a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ExtLibs/Utilities/LogSort.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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

Expand All @@ -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))
Expand Down

0 comments on commit 3a8e82a

Please sign in to comment.