1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-05-30 13:52:25 -04:00

Perseus support (9)

This commit is contained in:
f4exb 2018-02-08 18:16:22 +01:00
parent 47da4a2023
commit 3ac1be034a
3 changed files with 143 additions and 5 deletions

View File

@ -185,6 +185,10 @@ void PerseusGui::displaySettings()
ui->LOppmText->setText(QString("%1").arg(QString::number(m_settings.m_LOppmTenths/10.0, 'f', 1))); ui->LOppmText->setText(QString("%1").arg(QString::number(m_settings.m_LOppmTenths/10.0, 'f', 1)));
ui->sampleRate->setCurrentIndex(m_settings.m_devSampleRateIndex); ui->sampleRate->setCurrentIndex(m_settings.m_devSampleRateIndex);
ui->decim->setCurrentIndex(m_settings.m_log2Decim); ui->decim->setCurrentIndex(m_settings.m_log2Decim);
ui->wideband->setChecked(m_settings.m_wideBand);
ui->adcDither->setChecked(m_settings.m_adcDither);
ui->adcPreamp->setChecked(m_settings.m_adcPreamp);
ui->attenuator->setCurrentIndex((int) m_settings.m_attenuator);
blockApplySettings(false); blockApplySettings(false);
} }
@ -246,6 +250,12 @@ void PerseusGui::on_sampleRate_currentIndexChanged(int index)
sendSettings(); sendSettings();
} }
void PerseusGui::on_wideband_toggled(bool checked)
{
m_settings.m_wideBand = checked;
sendSettings();
}
void PerseusGui::on_decim_currentIndexChanged(int index) void PerseusGui::on_decim_currentIndexChanged(int index)
{ {
if ((index < 0) || (index > 5)) if ((index < 0) || (index > 5))
@ -284,6 +294,27 @@ void PerseusGui::on_transverter_clicked()
sendSettings(); sendSettings();
} }
void PerseusGui::on_attenuator_currentIndexChanged(int index)
{
if ((index < 0) || (index >= (int) PerseusSettings::Attenuator_last)) {
return;
}
m_settings.m_attenuator = (PerseusSettings::Attenuator) index;
sendSettings();
}
void PerseusGui::on_adcDither_toggled(bool checked)
{
m_settings.m_adcDither = checked;
sendSettings();
}
void PerseusGui::on_adcPreamp_toggled(bool checked)
{
m_settings.m_adcPreamp = checked;
sendSettings();
}
void PerseusGui::updateHardware() void PerseusGui::updateHardware()
{ {
qDebug() << "PerseusGui::updateHardware"; qDebug() << "PerseusGui::updateHardware";

View File

@ -79,10 +79,14 @@ private slots:
void on_LOppm_valueChanged(int value); void on_LOppm_valueChanged(int value);
void on_resetLOppm_clicked(); void on_resetLOppm_clicked();
void on_sampleRate_currentIndexChanged(int index); void on_sampleRate_currentIndexChanged(int index);
void on_wideband_toggled(bool checked);
void on_decim_currentIndexChanged(int index); void on_decim_currentIndexChanged(int index);
void on_startStop_toggled(bool checked); void on_startStop_toggled(bool checked);
void on_record_toggled(bool checked); void on_record_toggled(bool checked);
void on_transverter_clicked(); void on_transverter_clicked();
void on_attenuator_currentIndexChanged(int index);
void on_adcDither_toggled(bool checked);
void on_adcPreamp_toggled(bool checked);
void updateHardware(); void updateHardware();
void updateStatus(); void updateStatus();
void handleInputMessages(); void handleInputMessages();

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>324</width> <width>324</width>
<height>132</height> <height>256</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -276,6 +276,9 @@
<property name="toolTip"> <property name="toolTip">
<string>Device sample rate in MS/s</string> <string>Device sample rate in MS/s</string>
</property> </property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<item> <item>
<property name="text"> <property name="text">
<string>0000</string> <string>0000</string>
@ -290,6 +293,19 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="ButtonSwitch" name="wideband">
<property name="toolTip">
<string>Set wideband mode</string>
</property>
<property name="text">
<string>WB</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item> <item>
<spacer name="fcPosRightSpacer"> <spacer name="fcPosRightSpacer">
<property name="orientation"> <property name="orientation">
@ -360,22 +376,109 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="paddingLayout"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
<spacer name="verticalSpacer"> <widget class="QLabel" name="attenuatorLabel">
<property name="text">
<string>Att</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="attenuator">
<property name="toolTip">
<string>Attenuation (dB)</string>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<item>
<property name="text">
<string>0</string>
</property>
</item>
<item>
<property name="text">
<string>10</string>
</property>
</item>
<item>
<property name="text">
<string>20</string>
</property>
</item>
<item>
<property name="text">
<string>30</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="attenuatorUnits">
<property name="text">
<string>dB</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
</widget>
</item>
<item>
<widget class="QLabel" name="adcLabel">
<property name="text">
<string>ADC</string>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="adcDither">
<property name="toolTip">
<string>ADC dithering</string>
</property>
<property name="text">
<string>DIT</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="adcPreamp">
<property name="toolTip">
<string>ADC preamplifier</string>
</property>
<property name="text">
<string>PRE</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>40</width>
<height>40</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="paddingLayout"/>
</item>
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>