mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-13 20:01:46 -05:00
Direct sampling.
This commit is contained in:
parent
1f63911faf
commit
9c3b58d7a3
@ -152,3 +152,34 @@ void RTLSDRGui::updateHardware()
|
||||
message->submit(m_pluginAPI->getDSPEngineMessageQueue());
|
||||
m_updateTimer.stop();
|
||||
}
|
||||
|
||||
void RTLSDRGui::on_checkBox_stateChanged(int state) {
|
||||
if (state == Qt::Checked){
|
||||
((RTLSDRInput*)m_sampleSource)->set_ds_mode((ui->radioButton->isChecked()) ? true : false);
|
||||
ui->radioButton->setEnabled(true);
|
||||
ui->radioButton_2->setEnabled(true);
|
||||
ui->gain->setEnabled(false);
|
||||
//ui->decimation->setMaximum(6);
|
||||
|
||||
ui->centerFrequency->setValueRange(5, 0U, 30000U);
|
||||
ui->centerFrequency->setValue(0);
|
||||
}
|
||||
else {
|
||||
((RTLSDRInput*)m_sampleSource)->set_ds_mode(0);
|
||||
ui->radioButton->setEnabled(false);
|
||||
ui->radioButton_2->setEnabled(false);
|
||||
ui->gain->setEnabled(true);
|
||||
//ui->decimation->setMaximum(4);
|
||||
|
||||
ui->centerFrequency->setValueRange(7, 20000U, 2200000U);
|
||||
}
|
||||
}
|
||||
|
||||
void RTLSDRGui::on_radioButton_toggled(bool checked){
|
||||
if (checked)
|
||||
((RTLSDRInput*)m_sampleSource)->set_ds_mode(1);
|
||||
}
|
||||
void RTLSDRGui::on_radioButton_2_toggled(bool checked){
|
||||
if (checked)
|
||||
((RTLSDRInput*)m_sampleSource)->set_ds_mode(2);
|
||||
}
|
@ -46,6 +46,9 @@ private slots:
|
||||
void on_centerFrequency_changed(quint64 value);
|
||||
void on_gain_valueChanged(int value);
|
||||
void on_decimation_valueChanged(int value);
|
||||
void on_checkBox_stateChanged(int state);
|
||||
void on_radioButton_toggled(bool checked);
|
||||
void on_radioButton_2_toggled(bool checked);
|
||||
|
||||
void updateHardware();
|
||||
};
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>132</width>
|
||||
<height>82</height>
|
||||
<height>119</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -214,6 +214,63 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="text">
|
||||
<string>ds</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>i</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_2">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>q</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
|
@ -229,3 +229,8 @@ bool RTLSDRInput::applySettings(const GeneralSettings& generalSettings, const Se
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void RTLSDRInput::set_ds_mode(int on){
|
||||
rtlsdr_set_direct_sampling(m_dev, on);
|
||||
}
|
@ -91,6 +91,9 @@ public:
|
||||
|
||||
bool handleMessage(Message* message);
|
||||
|
||||
|
||||
void set_ds_mode(int on);
|
||||
|
||||
private:
|
||||
QMutex m_mutex;
|
||||
Settings m_settings;
|
||||
|
Loading…
Reference in New Issue
Block a user