From 12b6c74fc95b468c94c1ef4673cf635386cd5f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Inostroza?= Date: Thu, 11 Jan 2018 01:44:33 -0300 Subject: [PATCH] Fix loading of candump log files with extended frames. --- framefileio.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/framefileio.cpp b/framefileio.cpp index 4f3661f..7d27c07 100644 --- a/framefileio.cpp +++ b/framefileio.cpp @@ -1598,6 +1598,11 @@ bool FrameFileIO::loadCanDumpFile(QString filename, QVector* 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* frames) } /*NB: should we make sure len <= 8? */ - thisFrame.extended = false; thisFrame.isReceived = true; thisFrame.bus = 0; }