Fixes to UDS Scan window to make it function properly while also
loading/saving successfully
This commit is contained in:
+19
-7
@@ -127,6 +127,7 @@ void UDSScanWindow::displayScanEntry(int idx)
|
|||||||
{
|
{
|
||||||
if (inhibitUpdates) return;
|
if (inhibitUpdates) return;
|
||||||
if (idx == -1) return;
|
if (idx == -1) return;
|
||||||
|
inhibitUpdates = true; //need to do this so it doesn't mess things up as we fill in the fields
|
||||||
currEditEntry = &scanEntries.data()[idx];
|
currEditEntry = &scanEntries.data()[idx];
|
||||||
ui->spinStartID->setValue(currEditEntry->startID);
|
ui->spinStartID->setValue(currEditEntry->startID);
|
||||||
ui->spinEndID->setValue(currEditEntry->endID);
|
ui->spinEndID->setValue(currEditEntry->endID);
|
||||||
@@ -143,6 +144,7 @@ void UDSScanWindow::displayScanEntry(int idx)
|
|||||||
ui->spinLowerSubfunc->setValue(currEditEntry->subfunctLower);
|
ui->spinLowerSubfunc->setValue(currEditEntry->subfunctLower);
|
||||||
ui->spinUpperSubfunc->setValue(currEditEntry->subfunctUpper);
|
ui->spinUpperSubfunc->setValue(currEditEntry->subfunctUpper);
|
||||||
ui->spinIncrement->setValue(currEditEntry->subfunctIncrement);
|
ui->spinIncrement->setValue(currEditEntry->subfunctIncrement);
|
||||||
|
inhibitUpdates = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDSScanWindow::deleteSelectedScan()
|
void UDSScanWindow::deleteSelectedScan()
|
||||||
@@ -215,7 +217,7 @@ void UDSScanWindow::loadScans()
|
|||||||
QMessageBox::warning(this, "Cannot Load File", "File is not a supported version.\nCannot load it!");
|
QMessageBox::warning(this, "Cannot Load File", "File is not a supported version.\nCannot load it!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
inhibitUpdates = true;;
|
inhibitUpdates = true;
|
||||||
scanEntries.clear();
|
scanEntries.clear();
|
||||||
ui->listScansToRun->clear();
|
ui->listScansToRun->clear();
|
||||||
int numEntries;
|
int numEntries;
|
||||||
@@ -223,12 +225,22 @@ void UDSScanWindow::loadScans()
|
|||||||
for (int i = 0; i < numEntries; i++)
|
for (int i = 0; i < numEntries; i++)
|
||||||
{
|
{
|
||||||
ScanEntry entry;
|
ScanEntry entry;
|
||||||
load >> entry.startID >> entry.endID;
|
load >> entry.startID;
|
||||||
load >> entry.idOffset >> entry.bAdaptiveOffset >> entry.bShowNoReplies;
|
load >> entry.endID;
|
||||||
load >> entry.busToScan >> entry.maxWaitTime >> entry.scanType;
|
load >> entry.idOffset;
|
||||||
load >> entry.sessType >> entry.subfunctLen >> entry.subfunctLower;
|
load >> entry.bAdaptiveOffset;
|
||||||
load >> entry.subfunctUpper >> entry.subfunctIncrement;
|
load >> entry.bShowNoReplies;
|
||||||
load >> entry.serviceLower >> entry.serviceUpper;
|
load >> entry.busToScan;
|
||||||
|
load >> entry.maxWaitTime;
|
||||||
|
load >> entry.scanType;
|
||||||
|
load >> entry.sessType;
|
||||||
|
load >> entry.subfunctLen;
|
||||||
|
load >> entry.subfunctLower;
|
||||||
|
load >> entry.subfunctUpper;
|
||||||
|
load >> entry.subfunctIncrement;
|
||||||
|
load >> entry.serviceLower;
|
||||||
|
load >> entry.serviceUpper;
|
||||||
|
|
||||||
scanEntries.append(entry);
|
scanEntries.append(entry);
|
||||||
ui->listScansToRun->addItem(generateListDesc(scanEntries.length() - 1));
|
ui->listScansToRun->addItem(generateListDesc(scanEntries.length() - 1));
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -345,7 +345,7 @@
|
|||||||
<number>1024</number>
|
<number>1024</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="singleStep">
|
<property name="singleStep">
|
||||||
<number>8</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="displayIntegerBase">
|
<property name="displayIntegerBase">
|
||||||
<number>16</number>
|
<number>16</number>
|
||||||
|
|||||||
Reference in New Issue
Block a user