Fixed Vector ASC loading to work a bit better

This commit is contained in:
Collin Kidder
2019-02-13 20:58:30 -05:00
parent fa91de9e4f
commit 39f07fac32
+3
View File
@@ -657,6 +657,8 @@ bool FrameFileIO::loadCanalyzerASC(QString filename, QVector<CANFrame>* frames)
if (line.length() > 2) if (line.length() > 2)
{ {
QList<QByteArray> tokens = line.simplified().split(' '); QList<QByteArray> tokens = line.simplified().split(' ');
if (tokens.length() > 4)
{
thisFrame.timestamp = (uint32_t)(tokens[0].toFloat() * 1000000.0); thisFrame.timestamp = (uint32_t)(tokens[0].toFloat() * 1000000.0);
thisFrame.ID = tokens[2].toUInt(NULL, 16); thisFrame.ID = tokens[2].toUInt(NULL, 16);
thisFrame.len = tokens[5].toUInt(); thisFrame.len = tokens[5].toUInt();
@@ -676,6 +678,7 @@ bool FrameFileIO::loadCanalyzerASC(QString filename, QVector<CANFrame>* frames)
foundErrors = true; foundErrors = true;
} }
} }
}
frames->append(thisFrame); frames->append(thisFrame);
} }
//else foundErrors = true; //else foundErrors = true;