Fixes to ISO-TP decoding

This commit is contained in:
Collin Kidder
2019-09-19 19:45:20 -04:00
parent 334d8e4c64
commit 4a591f9279
6 changed files with 44 additions and 16 deletions
+16 -2
View File
@@ -61,7 +61,21 @@ void ISOTP_InterpreterWindow::showEvent(QShowEvent* event)
{
QDialog::showEvent(event);
readSettings();
QProgressDialog progress(qApp->activeWindow());
progress.setWindowModality(Qt::WindowModal);
progress.setLabelText("Analyzing Frames...");
progress.setCancelButton(nullptr);
progress.setRange(0,0);
progress.setMinimumDuration(0);
progress.show();
qApp->processEvents();
decoder->updatedFrames(-2);
progress.cancel();
installEventFilter(this);
}
@@ -134,7 +148,7 @@ void ISOTP_InterpreterWindow::filterAll()
for (int i = 0 ; i < ui->listFilter->count(); i++)
{
ui->listFilter->item(i)->setCheckState(Qt::Checked);
idFilters[ui->listFilter->item(1)->text().toInt(nullptr, 16)] = true;
//idFilters[ui->listFilter->item(i)->text().toInt(nullptr, 16)] = true;
}
}
@@ -143,7 +157,7 @@ void ISOTP_InterpreterWindow::filterNone()
for (int i = 0 ; i < ui->listFilter->count(); i++)
{
ui->listFilter->item(i)->setCheckState(Qt::Unchecked);
idFilters[ui->listFilter->item(1)->text().toInt(nullptr, 16)] = false;
//idFilters[ui->listFilter->item(i)->text().toInt(nullptr, 16)] = false;
}
}
+3 -3
View File
@@ -362,13 +362,13 @@ void UDSScanWindow::gotUDSReply(UDS_MESSAGE msg)
id = msg.ID;
qDebug() << "UDS message ID " << msg.ID << " service: " << msg.service << " subfunc: " << msg.subFunc;
qDebug() << "UDS message ID " << QString::number(msg.ID,16) << " service: " << QString::number(msg.service, 16) << " subfunc: " << QString::number(msg.subFunc, 16);
if ((id == (uint32_t)(sentFrame.ID + offset)) || ui->cbAllowAdaptiveOffset->isChecked())
{
serviceShortName = udsHandler->getServiceShortDesc(sentFrame.service);
if (serviceShortName.length() < 3) serviceShortName = QString::number(sentFrame.service, 16);
if (msg.service == 0x40 + sendingFrames[currIdx].service)
if (msg.service == (0x40 + sendingFrames[currIdx].service) )
{
setupNodes(id);
@@ -385,7 +385,7 @@ void UDSScanWindow::gotUDSReply(UDS_MESSAGE msg)
nodeSubFunc->setForeground(0, QBrush(Qt::darkGreen));
gotReply = true;
}
else if ( msg.isErrorReply && msg.service == sendingFrames[currIdx].service)
else if ( msg.isErrorReply && (msg.service == sendingFrames[currIdx].service) )
{
if (msg.data.length())
{