Added fix for reading PCAN extended IDS in standard id range,

This commit is contained in:
werner
2025-04-17 11:46:18 +02:00
parent 60b0e65a18
commit 1e26228738
+8 -4
View File
@@ -1454,7 +1454,8 @@ 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() > 0x10000000) ||
(tokens[3].length() >= 8))
{
thisFrame.setExtendedFrameFormat(true);
}
@@ -1506,7 +1507,8 @@ 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() > 0x10000000) ||
(tokens[4].length() >= 8))
{
thisFrame.setExtendedFrameFormat(true);
}
@@ -1548,7 +1550,8 @@ 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() > 0x10000000) ||
(tokens[3].length() >= 8))
{
thisFrame.setExtendedFrameFormat(true);
}
@@ -1600,7 +1603,8 @@ 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() > 0x10000000) ||
(tokens[4].length() >= 8))
{
thisFrame.setExtendedFrameFormat(true);
}