提交 8036b7b5 编写于 作者: 丁劲犇's avatar 丁劲犇 😸

Add bandwidth option

上级 c278a17f
......@@ -8,7 +8,7 @@
#include <QFileDialog>
specWidget::specWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::specWidget),
ui(new Ui::specWidget),
m_attenMod(new QStandardItemModel(this)),
m_runth(new uhd_io_thread(this)),
m_saveth(new uhd_io_thread(this)),
......@@ -613,3 +613,14 @@ void specWidget::on_checkBox_save_stateChanged(int arg1)
{
m_bSaveToFile = arg1==0?false:true;
}
void specWidget::on_spinBox_bw_valueChanged(int arg1)
{
double bw = arg1 * 1000;
if (bw > ui->plotter->getSampleRate())
bw = ui->plotter->getSampleRate();
if (bw <200000)
bw = 200000;
if (usrp)
usrp->set_rx_bandwidth(bw,m_channel);
}
......@@ -111,6 +111,8 @@ private slots:
void on_checkBox_save_stateChanged(int arg1);
void on_spinBox_bw_valueChanged(int arg1);
private:
void loadSettings();
void saveSettings();
......
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>787</width>
<width>793</width>
<height>466</height>
</rect>
</property>
......@@ -237,8 +237,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>310</width>
<height>348</height>
<width>320</width>
<height>370</height>
</rect>
</property>
<attribute name="label">
......@@ -352,6 +352,26 @@
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>BW(Khz)</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="spinBox_bw">
<property name="minimum">
<number>2</number>
</property>
<property name="maximum">
<number>200000</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_view">
......@@ -359,8 +379,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>166</width>
<height>164</height>
<width>320</width>
<height>370</height>
</rect>
</property>
<attribute name="label">
......@@ -523,8 +543,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>310</width>
<height>348</height>
<width>320</width>
<height>370</height>
</rect>
</property>
<attribute name="label">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册