diff --git a/SavvyCAN.pro b/SavvyCAN.pro index 7052c48..8d64e4d 100644 --- a/SavvyCAN.pro +++ b/SavvyCAN.pro @@ -45,7 +45,8 @@ SOURCES += main.cpp\ dbc_classes.cpp \ dbcloadsavewindow.cpp \ fuzzingwindow.cpp \ - udsscanwindow.cpp + udsscanwindow.cpp \ + can_structs.cpp HEADERS += mainwindow.h \ can_structs.h \ diff --git a/can_structs.cpp b/can_structs.cpp new file mode 100644 index 0000000..853c83d --- /dev/null +++ b/can_structs.cpp @@ -0,0 +1,2 @@ +#include "can_structs.h" + diff --git a/can_structs.h b/can_structs.h index 92e4491..e9668bd 100644 --- a/can_structs.h +++ b/can_structs.h @@ -1,9 +1,10 @@ #ifndef CAN_STRUCTS_H #define CAN_STRUCTS_H +#include #include -struct CANFrame +class CANFrame { public: int ID; @@ -26,5 +27,19 @@ public: int priority; bool isBroadcast; }; + +//the same as the CANFrame struct but with arbitrary data size. +struct ISOTP_FRAME +{ +public: + int ID; + int bus; + bool extended; + bool isReceived; + int len; + QVector data; + uint64_t timestamp; +}; + #endif // CAN_STRUCTS_H diff --git a/config.h b/config.h index 1fe461f..8030d77 100644 --- a/config.h +++ b/config.h @@ -1,7 +1,7 @@ #ifndef CONFIG #define CONFIG -#define VERSION 150 +#define VERSION 151 //try to keep this in sync. //SavvyCAN will complain if you connect a GVRET board with a revision diff --git a/graphingwindow.cpp b/graphingwindow.cpp index 05df3ed..afe9c4d 100644 --- a/graphingwindow.cpp +++ b/graphingwindow.cpp @@ -734,6 +734,9 @@ void GraphingWindow::loadDefinitions() QStringList filters; filters.append(QString(tr("Graph definition (*.gdf)"))); + if (dbcHandler == NULL) return; + if (dbcHandler->getFileCount() == 0) dbcHandler->createBlankFile(); + dialog.setFileMode(QFileDialog::ExistingFile); dialog.setNameFilters(filters); dialog.setViewMode(QFileDialog::Detail);