Fix off by one error in PCAN file loader

This commit is contained in:
Collin Kidder
2021-05-09 08:42:15 -04:00
parent bbbed28137
commit a6e1b91d84
+2 -2
View File
@@ -1445,11 +1445,11 @@ bool FrameFileIO::loadPCANFile(QString filename, QVector<CANFrame>* frames)
//; | | | | | | | |
//;---+-- ------+------ +- --+-- ---+---- +- -+-- -+ -- -- -- -- -- -- --
// 0-6 8-20 22 25-26 38 41-? two chars each + space
// 1) 1004.898 1 Tx 079B - 8 02 21 04 00 00 00 00 00
// 1) 1004.898 1 Tx 1fff079B - 8 02 21 04 00 00 00 00 00
else if (fileVersion == 13)
{
thisFrame.setTimeStamp(QCanBusFrame::TimeStamp(0, static_cast<uint64_t>(line.mid(8, 13).simplified().toDouble() * 1000.0)));
thisFrame.setFrameId(line.mid(30, 8).simplified().toUInt(nullptr, 16));
thisFrame.setFrameId(line.mid(31, 8).simplified().toUInt(nullptr, 16));
if (thisFrame.frameId() < 0x1FFFFFFF)
{
int numBytes = line.mid(43,2).trimmed().toInt();