Skip to content

Commit

Permalink
Fix signal viewer so that it handles multiplexed signals properly
Browse files Browse the repository at this point in the history
  • Loading branch information
collin80 committed Mar 19, 2024
1 parent 3018f84 commit 77f889e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions signalviewerwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,18 @@ void SignalViewerWindow::processFrame(CANFrame &frame)
if (!sig) return;
if (sig->parentMessage->ID == frame.frameId())
{
if (sig->processAsText(frame, sigString, false)) //if true we could interpret the signal so update it in the list
if (sig->isSignalInMessage(frame)) //filter out multiplexed signals that aren't in this message.
{
QTableWidgetItem *item = ui->tableViewer->item(i, VALUE_COL);
if (!item)
if (sig->processAsText(frame, sigString, false)) //if true we could interpret the signal so update it in the list
{
item = new QTableWidgetItem(sigString);
ui->tableViewer->setItem(i, VALUE_COL, item);
QTableWidgetItem *item = ui->tableViewer->item(i, VALUE_COL);
if (!item)
{
item = new QTableWidgetItem(sigString);
ui->tableViewer->setItem(i, VALUE_COL, item);
}
else item->setText(sigString);
}
else item->setText(sigString);
}
}
}
Expand Down

0 comments on commit 77f889e

Please sign in to comment.