Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for > 8 bytes per message in candump format #871

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- "master"
workflow_dispatch:
jobs:
buildlinux:
name: Linux x64
Expand Down
7 changes: 6 additions & 1 deletion framefileio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3784,12 +3784,17 @@ bool FrameFileIO::loadCanDumpFile(QString filename, QVector<CANFrame>* frames)
if (line.contains('[')) //the expanded format (second one from the above list)
{
//(1551774790.942758) can1 7A8 [8] F4 DC D1 83 0E 02 00 00
//(1551774790.942758) can1 7A8 [08] F4 DC D1 83 0E 02 00 00
// 0 1 2 3 4 5 6 7 8 9 10 11
thisFrame.setFrameId(tokens[2].toLong(nullptr, 16));
if (thisFrame.frameId() > 0x7FF) thisFrame.setExtendedFrameFormat(true);
else thisFrame.setExtendedFrameFormat(false);
thisFrame.setFrameType(QCanBusFrame::DataFrame);
int numBytes = tokens[3].at(1) - '0';
int numBytes;
if (tokens[3].at(2) == ']')
numBytes = tokens[3].at(1) - '0';
else
numBytes = (tokens[3].at(1) - '0')*10 + (tokens[3].at(2) - '0');
QByteArray bytes(numBytes, 0);
for (int c = 0; c < numBytes; c++)
{
Expand Down