Mission Planner Log Browse sometimes uses wrong firmware value
Some situations leave config.xml file with default firmware of ArduPlane (I.E. on new install, perhaps after MP revision update, Etc. ..) config.xml is only updated after a connection to the APM and then exiting Mission Planner. This may not always happen before a user uses the Log Browse feature. In the default case, when browsing an Arducopter log, the column names do not match the data in the log file. I have a change to LogBrowse.cs that will fix that. Simply add some code to PopulateDataTableFromUploadedFile() that changes MainV2.comPort.MAV.cs.firmware to match the log file parameter SYSID_SW_TYPE ( a switch and come cases)
Code insert to PopulateDataTableFromUploadedFile() listed here: ... bla bla bla ..... this.AddDataRowToTable(strLine, m_dtCSV);
strLine = strLine.Replace(", ", ",");
strLine = strLine.Replace(": ", ":");
string[] items = strLine.Split(',', ':');
// Dennis Spanogle added so can browse logs other than last connected APM firmware (or different updated config.xml file)
if (items[0].Contains("SYSID_SW_TYPE"))
{
switch (items[1].ToString())
{
case "10":
MainV2.comPort.MAV.cs.firmware = MainV2.Firmwares.ArduCopter2;
break;
case "7":
MainV2.comPort.MAV.cs.firmware = MainV2.Firmwares.Ateryx;
break;
case "20":
MainV2.comPort.MAV.cs.firmware = MainV2.Firmwares.ArduRover;
break;
case "0":
MainV2.comPort.MAV.cs.firmware = MainV2.Firmwares.ArduPlane;
break;
}
}
// End Dennis add
if (items[0].Contains("FMT"))
{
try
this will be in the next mp