Fixed Vector ASC loading to work a bit better
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user