Use selected can bus in uds scanner.

Before it always used the first bus no matter what.
This commit is contained in:
diekleinekuh
2023-02-14 19:00:49 +01:00
parent 7588aeec11
commit 60888e6a86
2 changed files with 10 additions and 0 deletions
+9
View File
@@ -77,6 +77,9 @@ UDSScanWindow::UDSScanWindow(const QVector<CANFrame> *frames, QWidget *parent) :
//not handling show no reply, max reply delay, reply offset, increment
int numBuses = CANConManager::getInstance()->getNumBuses();
for (int n = 0; n < numBuses; n++) ui->cbBuses->addItem(QString::number(n));
connect(ui->cbBuses, &QComboBox::currentTextChanged, this, &UDSScanWindow::setBusToScan);
installEventFilter(this);
addNewScan();
@@ -334,6 +337,12 @@ void UDSScanWindow::setSessType()
if (currEditEntry) currEditEntry->sessType = ui->cbSessType->currentIndex();
}
void UDSScanWindow::setBusToScan()
{
if (inhibitUpdates) return;
if (currEditEntry) currEditEntry->busToScan = ui->cbBuses->currentIndex();
}
void UDSScanWindow::setNoReplyVal()
{
if (inhibitUpdates) return;
+1
View File
@@ -81,6 +81,7 @@ private slots:
void setIncrementVal();
void setReplyOffset();
void setSessType();
void setBusToScan();
private:
Ui::UDSScanWindow *ui;