Merge branch 'master' of github.com:collin80/SavvyCAN into WIP

This commit is contained in:
Collin Kidder
2017-11-04 22:11:10 -04:00
8 changed files with 5936 additions and 2 deletions
+2
View File
@@ -214,6 +214,7 @@ void DBCMessageHandler::setJ1939(bool j1939)
DBCFile::DBCFile()
{
messageHandler = new DBCMessageHandler;
messageHandler->setJ1939(false);
}
DBCFile::DBCFile(const DBCFile& cpy)
@@ -346,6 +347,7 @@ void DBCFile::loadFile(QString fileName)
qDebug() << "Starting DBC load";
dbc_nodes.clear();
messageHandler->removeAllMessages();
messageHandler->setJ1939(false);
DBC_NODE falseNode;
falseNode.name = "Vector__XXX";
+78
View File
@@ -0,0 +1,78 @@
VERSION ""
NS_ :
NS_DESC_
CM_
BA_DEF_
BA_
VAL_
CAT_DEF_
CAT_
FILTER
BA_DEF_DEF_
EV_DATA_
ENVVAR_DATA_
SGTYPE_
SGTYPE_VAL_
BA_DEF_SGTYPE_
BA_SGTYPE_
SIG_TYPE_REF_
VAL_TABLE_
SIG_GROUP_
SIG_VALTYPE_
SIGTYPE_VALTYPE_
BO_TX_BU_
BA_DEF_REL_
BA_REL_
BA_DEF_DEF_REL_
BU_SG_REL_
BU_EV_REL_
BU_BO_REL_
SG_MUL_VAL_
BS_:
BU_: VCM Inverter LBC Charger
BO_ 468 Ctrl1: 8 VCM
SG_ RequestedTorque : 23|12@0- (1,0) [0|0] "" Vector__XXX
SG_ SecurityByte : 56|8@1+ (1,0) [0|0] "" Vector__XXX
BO_ 498 Ctrl2: 8 VCM
BO_ 644 WheelSpeeds: 8 VCM
SG_ LeftWheel : 7|16@0+ (1,0) [0|0] "" Vector__XXX
SG_ RightWheel : 23|16@0+ (1,0) [0|0] "" Vector__XXX
SG_ MysterySpeedSensor : 39|16@0+ (1,0) [0|0] "" Vector__XXX
SG_ TraveledDistance : 55|16@0+ (1,0) [0|0] "" Vector__XXX
BO_ 1449 Status1: 8 VCM
BO_ 1465 Status2: 5 VCM
BO_ 282 Inv1: 8 Inverter
BO_ 474 InverterStatus: 8 Inverter
SG_ Voltage : 0|8@1+ (1,0) [0|0] "" Vector__XXX
SG_ Amps : 18|11@0- (0.5,0) [0|0] "" Vector__XXX
SG_ RPM : 39|16@0- (0.5,0) [0|0] "" Vector__XXX
SG_ MultiplexByte : 48|8@1+ (1,0) [0|0] "" Vector__XXX
SG_ SecurityByte : 56|8@1+ (1,0) [0|0] "" Vector__XXX
BO_ 1370 InverterStatus2: 8 Inverter
SG_ InvBoardTemp : 8|8@1+ (0.5,0) [0|0] "" Vector__XXX
SG_ IGBTTemp : 16|8@1+ (0.5,0) [0|0] "" Vector__XXX
SG_ MotorTemp : 40|8@1+ (0.5,0) [0|0] "" Vector__XXX
BO_ 475 BatteryStatus: 8 LBC
SG_ BattCurrent : 7|11@0- (0.5,0) [0|0] "" Vector__XXX
SG_ BattVoltage : 23|10@0+ (0.5,0) [0|0] "" Vector__XXX
SG_ SecurityByte : 56|8@1+ (1,0) [0|0] "" Vector__XXX
SG_ MultiplexByte : 48|8@1+ (1,0) [0|0] "" Vector__XXX
BO_ 476 BatteryStatus2: 8 LBC
SG_ MaxPower : 0|8@1+ (1,0) [0|0] "kW" Vector__XXX
SG_ MaxChargePower : 15|12@0+ (1,0) [0|0] "" Vector__XXX
SG_ SecurityByte : 56|8@1+ (1,0) [0|0] "" Vector__XXX
CM_ BU_ VCM "Main ECU";
CM_ BU_ LBC "Lithium Battery Controller";
File diff suppressed because it is too large Load Diff
+10 -1
View File
@@ -41,7 +41,10 @@ MainWindow::MainWindow(QWidget *parent) :
model = new CANFrameModel(this); // set parent to mainwindow to prevent canframemodel to change thread (might be done by setModel but just in case)
ui->canFramesView->setModel(model);
QSortFilterProxyModel* proxyModel = new QSortFilterProxyModel;
proxyModel->setSourceModel(model);
ui->canFramesView->setModel(proxyModel);
readSettings();
@@ -54,6 +57,7 @@ MainWindow::MainWindow(QWidget *parent) :
ui->canFramesView->setColumnWidth(6, 225);
QHeaderView *HorzHdr = ui->canFramesView->horizontalHeader();
HorzHdr->setStretchLastSection(true); //causes the data column to automatically fill the tableview
connect(HorzHdr, SIGNAL(sectionClicked(int)), this, SLOT(headerClicked(int)));
graphingWindow = NULL;
frameInfoWindow = NULL;
@@ -299,6 +303,11 @@ void MainWindow::updateConnectionSettings(QString connectionType, QString port,
}
}
void MainWindow::headerClicked(int logicalIndex)
{
ui->canFramesView->sortByColumn(logicalIndex);
}
void MainWindow::gridClicked(QModelIndex idx)
{
if (ui->canFramesView->rowHeight(idx.row()) > normalRowHeight)
+1
View File
@@ -95,6 +95,7 @@ private slots:
void filterListItemChanged(QListWidgetItem *item);
void filterSetAll();
void filterClearAll();
void headerClicked (int logicalIndex);
public slots:
void gotFrames(int);
+6
View File
@@ -42,6 +42,7 @@ ISOTP_InterpreterWindow::ISOTP_InterpreterWindow(const QVector<CANFrame> *frames
ui->tableIsoFrames->setHorizontalHeaderLabels(headers);
QHeaderView *HorzHdr = ui->tableIsoFrames->horizontalHeader();
HorzHdr->setStretchLastSection(true);
connect(HorzHdr, SIGNAL(sectionClicked(int)), this, SLOT(headerClicked(int)));
decoder->setReception(true);
decoder->setFlowCtrl(false);
@@ -154,6 +155,11 @@ void ISOTP_InterpreterWindow::updatedFrames(int numFrames)
}
}
void ISOTP_InterpreterWindow::headerClicked(int logicalIndex)
{
ui->tableIsoFrames->sortByColumn(logicalIndex);
}
void ISOTP_InterpreterWindow::showDetailView()
{
QString buildString;
+1
View File
@@ -31,6 +31,7 @@ private slots:
void filterNone();
void interpretCapturedFrames();
void useExtendedAddressing(bool checked);
void headerClicked(int logicalIndex);
private:
Ui::ISOTP_InterpreterWindow *ui;
+3 -1
View File
@@ -349,9 +349,11 @@ void UDSScriptHelper::sendUDS(QJSValue bus, QJSValue id, QJSValue service, QJSVa
if (!data.isArray()) qDebug() << "data isn't an array";
msg.data.reserve(msg.len);
for (unsigned int i = 0; i < msg.len; i++)
{
msg.data[i] = static_cast<uint8_t>(data.property(i).toInt());
msg.data.append(static_cast<uint8_t>(data.property(i).toInt()));
}
msg.bus = (uint32_t)bus.toInt();