Skip to content

Commit

Permalink
Merge pull request ganzziani#22 from pilatomic/master
Browse files Browse the repository at this point in the history
Added clear buttons to protocol sniffer
  • Loading branch information
ganzziani authored Nov 4, 2016
2 parents e836750 + 6905dd3 commit c92dfb6
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 10 deletions.
25 changes: 25 additions & 0 deletions xprotolabinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5044,3 +5044,28 @@ void XprotolabInterface::on_radioPulse_clicked()
sendMStatusControlsForMM();
m_mmTimer.start(100);
}

void XprotolabInterface::on_clearMosiButton_clicked()
{
ui->mosiTextEdit->clear();
}

void XprotolabInterface::on_clearMisoButton_clicked()
{
ui->misoTextEdit->clear();
}

void XprotolabInterface::on_i2cClearButton_clicked()
{
ui->i2cTextEdit->clear();
}

void XprotolabInterface::on_clearRxButton_clicked()
{
ui->rxTextEdit->clear();
}

void XprotolabInterface::on_clearTxButton_clicked()
{
ui->txTextEdit->clear();
}
10 changes: 10 additions & 0 deletions xprotolabinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,16 @@ private slots:

void on_radioPulse_clicked();

void on_clearMosiButton_clicked();

void on_clearMisoButton_clicked();

void on_i2cClearButton_clicked();

void on_clearRxButton_clicked();

void on_clearTxButton_clicked();

private:
Ui::XprotolabInterface *ui;
int m_mainTimerDelay;
Expand Down
55 changes: 45 additions & 10 deletions xprotolabinterface.ui
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
</font>
</property>
<property name="currentIndex">
<number>0</number>
<number>3</number>
</property>
<property name="elideMode">
<enum>Qt::ElideNone</enum>
Expand Down Expand Up @@ -4036,7 +4036,7 @@ Frequency</string>
<item>
<widget class="QTabWidget" name="protocolTabWidget">
<property name="currentIndex">
<number>0</number>
<number>2</number>
</property>
<widget class="QWidget" name="spiTab">
<attribute name="title">
Expand Down Expand Up @@ -4178,9 +4178,9 @@ Frequency</string>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_75">
<item>
<widget class="QPlainTextEdit" name="mosiTextEdit">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QPlainTextEdit" name="misoTextEdit">
<property name="font">
<font>
<family>Courier</family>
Expand All @@ -4191,8 +4191,8 @@ Frequency</string>
</property>
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="misoTextEdit">
<item row="0" column="0">
<widget class="QPlainTextEdit" name="mosiTextEdit">
<property name="font">
<font>
<family>Courier</family>
Expand All @@ -4203,6 +4203,20 @@ Frequency</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="clearMosiButton">
<property name="text">
<string>Clear</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="clearMisoButton">
<property name="text">
<string>Clear</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
Expand Down Expand Up @@ -4298,6 +4312,13 @@ Frequency</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="i2cClearButton">
<property name="text">
<string>Clear</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
Expand Down Expand Up @@ -4465,8 +4486,8 @@ Frequency</string>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_70">
<item>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QTextEdit" name="rxTextEdit">
<property name="font">
<font>
Expand All @@ -4478,7 +4499,7 @@ Frequency</string>
</property>
</widget>
</item>
<item>
<item row="0" column="1">
<widget class="QPlainTextEdit" name="txTextEdit">
<property name="font">
<font>
Expand All @@ -4490,6 +4511,20 @@ Frequency</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="clearRxButton">
<property name="text">
<string>Clear</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="clearTxButton">
<property name="text">
<string>Clear</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
Expand Down

0 comments on commit c92dfb6

Please sign in to comment.