Merge branch 'master' of github.com:collin80/SavvyCAN into WIP
This commit is contained in:
@@ -1,12 +1,14 @@
|
|||||||
# SavvyCAN
|
# SavvyCAN
|
||||||
Qt based cross platform canbus tool
|
Qt based cross platform canbus tool
|
||||||
(C) 2015-2018 EVTV and Collin Kidder
|
(C) 2015-2021 EVTV and Collin Kidder
|
||||||
|
|
||||||
A Qt5 based cross platform tool which can be used to load, save, and capture canbus frames.
|
A Qt5 based cross platform tool which can be used to load, save, and capture canbus frames.
|
||||||
This tool is designed to help with visualization, reverse engineering, debugging, and
|
This tool is designed to help with visualization, reverse engineering, debugging, and
|
||||||
capturing of canbus frames.
|
capturing of canbus frames.
|
||||||
|
|
||||||
Really requires at a resolution of at least 1024x768. Fully multi-monitor capable. Works on 4K monitors as well.
|
Please use the "Discussions" tab here on GitHub to ask questions and interact with the community.
|
||||||
|
|
||||||
|
Requires at a resolution of at least 1024x768. Fully multi-monitor capable. Works on 4K monitors as well.
|
||||||
|
|
||||||
You are highly recommended to use the
|
You are highly recommended to use the
|
||||||
[CANDue board from EVTV](http://store.evtv.me/proddetail.php?prod=ArduinoDueCANBUS&cat=23).
|
[CANDue board from EVTV](http://store.evtv.me/proddetail.php?prod=ArduinoDueCANBUS&cat=23).
|
||||||
@@ -46,12 +48,15 @@ http://www.qcustomplot.com/
|
|||||||
However, this source code is integrated into the source for SavvyCAN and one isn't required
|
However, this source code is integrated into the source for SavvyCAN and one isn't required
|
||||||
to download it separately.
|
to download it separately.
|
||||||
|
|
||||||
This project requires 5.8.0 or higher because of a dependency on QSerialBus. However, you will get
|
This project requires 5.10.0 or higher because of a dependency on QtSerialBus. However, you will get
|
||||||
even more SerialBus goodness if you use QT 5.11 or 5.12
|
even more SerialBus goodness if you use QT 5.11 or higher.
|
||||||
|
|
||||||
|
NOTE: QT6 currently lacks support for QtSerialBus and many other QT sub-features. At this time you cannot
|
||||||
|
use QT6 to compile SavvyCAN. Support for QT6 should be possible around QT6.2.
|
||||||
|
|
||||||
## Instructions for compiling:
|
## Instructions for compiling:
|
||||||
|
|
||||||
[Download the newest stable version of Qt directly from qt.io](https://www.qt.io/download/) (You need 5.8.x or newer)
|
[Download the newest stable version of Qt directly from qt.io](https://www.qt.io/download/) (You need 5.10.x or newer)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd ~
|
cd ~
|
||||||
@@ -60,7 +65,7 @@ git clone https://github.com/collin80/SavvyCAN.git
|
|||||||
|
|
||||||
cd SavvyCAN
|
cd SavvyCAN
|
||||||
|
|
||||||
~/Qt/5.8/gcc_64/bin/qmake
|
~/Qt/5.10/gcc_64/bin/qmake
|
||||||
|
|
||||||
make
|
make
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -188,6 +188,7 @@ void SerialBusConnection::framesReceived()
|
|||||||
{
|
{
|
||||||
frame_p->setExtendedFrameFormat(recFrame.hasExtendedFrameFormat());
|
frame_p->setExtendedFrameFormat(recFrame.hasExtendedFrameFormat());
|
||||||
frame_p->setFrameId(recFrame.frameId() + 0x20000000ull);
|
frame_p->setFrameId(recFrame.frameId() + 0x20000000ull);
|
||||||
|
frame_p->isReceived = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -197,7 +198,8 @@ void SerialBusConnection::framesReceived()
|
|||||||
frame_p->setTimeStamp(recFrame.timeStamp());
|
frame_p->setTimeStamp(recFrame.timeStamp());
|
||||||
frame_p->setFrameType(recFrame.frameType());
|
frame_p->setFrameType(recFrame.frameType());
|
||||||
frame_p->setError(recFrame.error());
|
frame_p->setError(recFrame.error());
|
||||||
frame_p->isReceived = true;
|
/* If recorded frame has a local echo, it is a Tx message, and thus should not be marked as Rx */
|
||||||
|
frame_p->isReceived = !recFrame.hasLocalEcho();
|
||||||
|
|
||||||
if (useSystemTime) {
|
if (useSystemTime) {
|
||||||
frame_p->setTimeStamp(QCanBusFrame::TimeStamp(0, QDateTime::currentMSecsSinceEpoch() * 1000ul));
|
frame_p->setTimeStamp(QCanBusFrame::TimeStamp(0, QDateTime::currentMSecsSinceEpoch() * 1000ul));
|
||||||
|
|||||||
+3
-3
@@ -1283,7 +1283,7 @@ bool FrameFileIO::isPCANFile(QString filename)
|
|||||||
{
|
{
|
||||||
while (!inFile->atEnd()) {
|
while (!inFile->atEnd()) {
|
||||||
lineCounter++;
|
lineCounter++;
|
||||||
if (lineCounter > 10)
|
if (lineCounter > 25)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1423,7 +1423,7 @@ bool FrameFileIO::loadPCANFile(QString filename, QVector<CANFrame>* frames)
|
|||||||
{
|
{
|
||||||
int numBytes = line.mid(37,2).trimmed().toInt();
|
int numBytes = line.mid(37,2).trimmed().toInt();
|
||||||
QByteArray bytes(numBytes, 0);
|
QByteArray bytes(numBytes, 0);
|
||||||
qDebug() << thisFrame.payload().length();
|
//qDebug() << thisFrame.payload().length();
|
||||||
thisFrame.isReceived = true;
|
thisFrame.isReceived = true;
|
||||||
thisFrame.bus = 0;
|
thisFrame.bus = 0;
|
||||||
if (line.at(25) == ' ') {
|
if (line.at(25) == ' ') {
|
||||||
@@ -1434,7 +1434,7 @@ bool FrameFileIO::loadPCANFile(QString filename, QVector<CANFrame>* frames)
|
|||||||
if (line.at(40) == 'R') {
|
if (line.at(40) == 'R') {
|
||||||
thisFrame.setFrameType(QCanBusFrame::RemoteRequestFrame);
|
thisFrame.setFrameType(QCanBusFrame::RemoteRequestFrame);
|
||||||
} else {
|
} else {
|
||||||
QList<QByteArray> tokens = line.mid(40, thisFrame.payload().length() * 3).split(' ');
|
QList<QByteArray> tokens = line.mid(40, numBytes * 3).split(' ');
|
||||||
thisFrame.setFrameType(QCanBusFrame::DataFrame);
|
thisFrame.setFrameType(QCanBusFrame::DataFrame);
|
||||||
for (int d = 0; d < numBytes; d++)
|
for (int d = 0; d < numBytes; d++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
|
|
||||||
|
//Add a local path for Qt extensions, to allow for per-application extensions.
|
||||||
|
a.addLibraryPath("plugins");
|
||||||
|
|
||||||
//These things are used by QSettings to set up setting storage
|
//These things are used by QSettings to set up setting storage
|
||||||
a.setOrganizationName("EVTV");
|
a.setOrganizationName("EVTV");
|
||||||
a.setApplicationName("SavvyCAN");
|
a.setApplicationName("SavvyCAN");
|
||||||
|
|||||||
Reference in New Issue
Block a user