Skip to content

Commit

Permalink
Fix PCAN file loading to more correctly categorize extended vs standa…
Browse files Browse the repository at this point in the history
…rd frames
  • Loading branch information
collin80 committed Oct 29, 2024
1 parent b5d3bff commit d710753
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions framefileio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1454,7 +1454,7 @@ bool FrameFileIO::loadPCANFile(QString filename, QVector<CANFrame>* frames)
QByteArray bytes(numBytes, 0);
thisFrame.isReceived = true;
thisFrame.bus = 0;
if (thisFrame.frameId() > 0x10000000)
if (thisFrame.frameId() > 0x7FF)
{
thisFrame.setExtendedFrameFormat(true);
}
Expand Down Expand Up @@ -1506,7 +1506,7 @@ bool FrameFileIO::loadPCANFile(QString filename, QVector<CANFrame>* frames)
//qDebug() << thisFrame.payload().length();
thisFrame.isReceived = true;
thisFrame.bus = tokens[2].toInt();
if (thisFrame.frameId() > 0x10000000)
if (thisFrame.frameId() > 0x7FF)
{
thisFrame.setExtendedFrameFormat(true);
}
Expand Down Expand Up @@ -1548,7 +1548,7 @@ bool FrameFileIO::loadPCANFile(QString filename, QVector<CANFrame>* frames)
//qDebug() << thisFrame.payload().length();
thisFrame.isReceived = true;
thisFrame.bus = 0;
if (thisFrame.frameId() > 0x10000000)
if (thisFrame.frameId() > 0x7FF)
{
thisFrame.setExtendedFrameFormat(true);
}
Expand Down Expand Up @@ -1600,7 +1600,7 @@ bool FrameFileIO::loadPCANFile(QString filename, QVector<CANFrame>* frames)
//qDebug() << thisFrame.payload().length();
thisFrame.isReceived = true;
thisFrame.bus = tokens[3].toInt();
if (thisFrame.frameId() > 0x10000000)
if (thisFrame.frameId() > 0x7FF)
{
thisFrame.setExtendedFrameFormat(true);
}
Expand Down

0 comments on commit d710753

Please sign in to comment.