diff --git a/bus_protocols/uds_handler.cpp b/bus_protocols/uds_handler.cpp index b2dd193..697f758 100644 --- a/bus_protocols/uds_handler.cpp +++ b/bus_protocols/uds_handler.cpp @@ -512,13 +512,13 @@ QString UDS_HANDLER::getDetailedMessageAnalysis(const UDS_MESSAGE &msg) if (dataLen > 3) { int routineID; - routineID = (data[1] * 256 + data[2]); + routineID = (data[2] * 256 + data[3]); buildString.append("\nRoutine ID: " + Utility::formatHexNum(routineID)); } if (dataLen > 4) { buildString.append("\nParameter bytes to routine: "); - for (int i = 3; i < dataLen; i++) + for (int i = 4; i < dataLen; i++) { buildString.append(Utility::formatHexNum(data[i]) + " "); } @@ -529,13 +529,13 @@ QString UDS_HANDLER::getDetailedMessageAnalysis(const UDS_MESSAGE &msg) if (dataLen > 2) { int routineID; - routineID = (data[1] * 256 + data[2]); + routineID = (data[2] * 256 + data[3]); buildString.append("\nRoutine ID: " + Utility::formatHexNum(routineID)); } - if (dataLen > 3) + if (dataLen > 4) { buildString.append("\nBytes returned by routine: "); - for (int i = 3; i < dataLen; i++) + for (int i = 4; i < dataLen; i++) { buildString.append(Utility::formatHexNum(data[i]) + " "); } diff --git a/canframemodel.cpp b/canframemodel.cpp index 486a1da..1340918 100644 --- a/canframemodel.cpp +++ b/canframemodel.cpp @@ -463,8 +463,8 @@ QVariant CANFrameModel::data(const QModelIndex &index, int role) const DBC_MESSAGE *msg = dbcHandler->findMessage(thisFrame); if (msg != nullptr) { - tempString.append(" \n"); - tempString.append(msg->name + "\n" + msg->comment + "\n"); + tempString.append(" <" + msg->name + ">\n"); + if (msg->comment.length() > 1) tempString.append(msg->comment + "\n"); for (int j = 0; j < msg->sigHandler->getCount(); j++) { QString sigString; diff --git a/filterutility.cpp b/filterutility.cpp index 657deec..72cc3ed 100644 --- a/filterutility.cpp +++ b/filterutility.cpp @@ -55,8 +55,11 @@ QListWidgetItem * FilterUtility::createFilterItem(int32_t id, QListWidget* paren QListWidgetItem *thisItem = new QListWidgetItem(parent); QString filterItemName = Utility::formatCANID(id); + //Note, there are multiple filter labeling preferences. There is one in main settings to globally + //enable or disable them all. Then each loaded DBC file also can be selected on/off + //Both must be enabled for you to see labeling. if (settings.value("Main/FilterLabeling", false).toBool()) - { + { // Filter labeling (show interpreted frame names next to the CAN addr ID) MatchingCriteria_t matchingCriteria; DBC_MESSAGE *msg = dbcHandler->findMessageForFilter(id,&matchingCriteria); diff --git a/mainwindow.cpp b/mainwindow.cpp index d492eb4..a80a9f3 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -51,9 +51,15 @@ MainWindow::MainWindow(QWidget *parent) : readSettings(); - //QHeaderView *verticalHeader = ui->canFramesView->verticalHeader(); - //verticalHeader->setSectionResizeMode(QHeaderView::Fixed); - //verticalHeader->setDefaultSectionSize(10); + QHeaderView *verticalHeader = ui->canFramesView->verticalHeader(); + verticalHeader->setSectionResizeMode(QHeaderView::Fixed); + QSettings settings; + int fontSize = settings.value("Main/FontSize", 9).toUInt(); + QFont sysFont = QFont(); //get default font + sysFont.setPointSize(fontSize); + verticalHeader->setDefaultSectionSize(sysFont.pixelSize()); + ui->canFramesView->setFont(sysFont); + 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)));