FuzzingWindow: Add buttons to set all high/low/auto

This commit is contained in:
Florian
2025-02-03 00:33:11 +01:00
parent 0843081cc5
commit 56fcb23a5e
3 changed files with 57 additions and 0 deletions
+30
View File
@@ -19,6 +19,9 @@ FuzzingWindow::FuzzingWindow(const QVector<CANFrame> *frames, QWidget *parent) :
fuzzTimer = new QTimer();
connect(ui->btnMarkAllHigh, &QPushButton::clicked, this, &FuzzingWindow::markAllHigh);
connect(ui->btnMarkAllLow, &QPushButton::clicked, this, &FuzzingWindow::markAllLow);
connect(ui->btnMarkAllAuto, &QPushButton::clicked, this, &FuzzingWindow::markAllAuto);
connect(ui->btnStartStop, &QPushButton::clicked, this, &FuzzingWindow::toggleFuzzing);
connect(ui->btnAllFilters, &QPushButton::clicked, this, &FuzzingWindow::setAllFilters);
connect(ui->btnNoFilters, &QPushButton::clicked, this, &FuzzingWindow::clearAllFilters);
@@ -508,3 +511,30 @@ void FuzzingWindow::redrawGrid()
ui->bitfield->setReference(refBytes, false);
ui->bitfield->updateData(dataBytes, true);
}
void FuzzingWindow::markAllHigh()
{
for (int i = 0; i < 512; i++)
{
bitGrid[i] = 2;
}
redrawGrid();
}
void FuzzingWindow::markAllLow()
{
for (int i = 0; i < 512; i++)
{
bitGrid[i] = 0;
}
redrawGrid();
}
void FuzzingWindow::markAllAuto()
{
for (int i = 0; i < 512; i++)
{
bitGrid[i] = 1;
}
redrawGrid();
}
+3
View File
@@ -42,6 +42,9 @@ private slots:
void bitfieldClicked(int);
void changedNumDataBytes(int newVal);
void updatedFrames(int numFrames);
void markAllHigh();
void markAllLow();
void markAllAuto();
private:
Ui::FuzzingWindow *ui;
+24
View File
@@ -487,6 +487,27 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnMarkAllHigh">
<property name="text">
<string>All High</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnMarkAllLow">
<property name="text">
<string>All Low</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnMarkAllAuto">
<property name="text">
<string>All Auto</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnStartStop">
<property name="text">
@@ -534,6 +555,9 @@
<tabstop>listID</tabstop>
<tabstop>btnAllFilters</tabstop>
<tabstop>btnNoFilters</tabstop>
<tabstop>btnMarkAllHigh</tabstop>
<tabstop>btnMarkAllLow</tabstop>
<tabstop>btnMarkAllAuto</tabstop>
<tabstop>btnStartStop</tabstop>
</tabstops>
<resources/>