Fix UDS interpretation of read by ID, Fix up display issues with
interpreted messages on main screen.
This commit is contained in:
@@ -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]) + " ");
|
||||
}
|
||||
|
||||
+2
-2
@@ -463,8 +463,8 @@ QVariant CANFrameModel::data(const QModelIndex &index, int role) const
|
||||
DBC_MESSAGE *msg = dbcHandler->findMessage(thisFrame);
|
||||
if (msg != nullptr)
|
||||
{
|
||||
tempString.append(" <Interpreted>\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;
|
||||
|
||||
+4
-1
@@ -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);
|
||||
|
||||
+9
-3
@@ -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)));
|
||||
|
||||
Reference in New Issue
Block a user