Skip to content

Commit d710753

Browse files
committed
Fix PCAN file loading to more correctly categorize extended vs standard frames
1 parent b5d3bff commit d710753

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

framefileio.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ bool FrameFileIO::loadPCANFile(QString filename, QVector<CANFrame>* frames)
14541454
QByteArray bytes(numBytes, 0);
14551455
thisFrame.isReceived = true;
14561456
thisFrame.bus = 0;
1457-
if (thisFrame.frameId() > 0x10000000)
1457+
if (thisFrame.frameId() > 0x7FF)
14581458
{
14591459
thisFrame.setExtendedFrameFormat(true);
14601460
}
@@ -1506,7 +1506,7 @@ bool FrameFileIO::loadPCANFile(QString filename, QVector<CANFrame>* frames)
15061506
//qDebug() << thisFrame.payload().length();
15071507
thisFrame.isReceived = true;
15081508
thisFrame.bus = tokens[2].toInt();
1509-
if (thisFrame.frameId() > 0x10000000)
1509+
if (thisFrame.frameId() > 0x7FF)
15101510
{
15111511
thisFrame.setExtendedFrameFormat(true);
15121512
}
@@ -1548,7 +1548,7 @@ bool FrameFileIO::loadPCANFile(QString filename, QVector<CANFrame>* frames)
15481548
//qDebug() << thisFrame.payload().length();
15491549
thisFrame.isReceived = true;
15501550
thisFrame.bus = 0;
1551-
if (thisFrame.frameId() > 0x10000000)
1551+
if (thisFrame.frameId() > 0x7FF)
15521552
{
15531553
thisFrame.setExtendedFrameFormat(true);
15541554
}
@@ -1600,7 +1600,7 @@ bool FrameFileIO::loadPCANFile(QString filename, QVector<CANFrame>* frames)
16001600
//qDebug() << thisFrame.payload().length();
16011601
thisFrame.isReceived = true;
16021602
thisFrame.bus = tokens[3].toInt();
1603-
if (thisFrame.frameId() > 0x10000000)
1603+
if (thisFrame.frameId() > 0x7FF)
16041604
{
16051605
thisFrame.setExtendedFrameFormat(true);
16061606
}

0 commit comments

Comments
 (0)