Merge pull request #124 from FabianInostroza/fix_candump_load

Fix loading of candump log files with extended frames.
This commit is contained in:
Collin Kidder
2018-01-11 18:25:33 -05:00
committed by GitHub
+5 -1
View File
@@ -1598,6 +1598,11 @@ bool FrameFileIO::loadCanDumpFile(QString filename, QVector<CANFrame>* frames)
/* ID */
qDebug() << IdValExp.cap(1);
thisFrame.ID = IdValExp.cap(1).toInt(&ret, 16);
if (IdValExp.cap(1).length() > 3) {
thisFrame.extended = true;
} else {
thisFrame.extended = false;
}
if(!ret) continue;
QString val= IdValExp.cap(2);
@@ -1616,7 +1621,6 @@ bool FrameFileIO::loadCanDumpFile(QString filename, QVector<CANFrame>* frames)
}
/*NB: should we make sure len <= 8? */
thisFrame.extended = false;
thisFrame.isReceived = true;
thisFrame.bus = 0;
}