From ca83d77d2fbf0194c66fd34ca7c047e3a6998757 Mon Sep 17 00:00:00 2001 From: Cyber MacGeddon Date: Wed, 4 Nov 2020 16:19:38 +0000 Subject: [PATCH 1/2] Modify the parsing of the 'id' trigger. Documentation says that trigger should be 'id' followed by the ID and gives the example 'id0x200'. This commit changes parsing to match the docs, previously the character between prefix and number was ignored, so that 'id:0x200' would work, but 'id0x200' would not. --- framesenderwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framesenderwindow.cpp b/framesenderwindow.cpp index 622f729..49ce0d0 100644 --- a/framesenderwindow.cpp +++ b/framesenderwindow.cpp @@ -694,7 +694,7 @@ void FrameSenderWindow::processTriggerText(int line) QString tok = trigToks.at(x); if (tok.left(2) == "ID") { - thisTrigger.ID = Utility::ParseStringToNum(tok.right(tok.length() - 3)); + thisTrigger.ID = Utility::ParseStringToNum(tok.right(tok.length() - 2)); if (thisTrigger.maxCount == -1) thisTrigger.maxCount = 10000000; if (thisTrigger.milliseconds == -1) thisTrigger.milliseconds = 0; //by default don't count, just send it upon trigger From f3f7e83a36bdf1cf76b4676a5b03bd908607b613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efe=20Can=20=C4=B0=C3=A7=C3=B6z?= Date: Sun, 13 Dec 2020 01:03:04 +0300 Subject: [PATCH 2/2] Solving #265 by replacing the use of empty payload length with numBytes taken from line --- framefileio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framefileio.cpp b/framefileio.cpp index 20e7fb0..0663428 100644 --- a/framefileio.cpp +++ b/framefileio.cpp @@ -1375,7 +1375,7 @@ bool FrameFileIO::loadPCANFile(QString filename, QVector* frames) if (line.at(41) == 'R') { thisFrame.setFrameType(QCanBusFrame::RemoteRequestFrame); } else { - QList tokens = line.mid(41, thisFrame.payload().length() * 3).split(' '); + QList tokens = line.mid(41, numBytes * 3).split(' '); thisFrame.setFrameType(QCanBusFrame::DataFrame); for (int d = 0; d < numBytes; d++) {