Perseus support (9)

pull/147/head
f4exb 2018-02-08 18:16:22 +01:00
rodzic 47da4a2023
commit 3ac1be034a
3 zmienionych plików z 143 dodań i 5 usunięć

Wyświetl plik

@ -185,6 +185,10 @@ void PerseusGui::displaySettings()
ui->LOppmText->setText(QString("%1").arg(QString::number(m_settings.m_LOppmTenths/10.0, 'f', 1)));
ui->sampleRate->setCurrentIndex(m_settings.m_devSampleRateIndex);
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);
}
@ -246,6 +250,12 @@ void PerseusGui::on_sampleRate_currentIndexChanged(int index)
sendSettings();
}
void PerseusGui::on_wideband_toggled(bool checked)
{
m_settings.m_wideBand = checked;
sendSettings();
}
void PerseusGui::on_decim_currentIndexChanged(int index)
{
if ((index < 0) || (index > 5))
@ -284,6 +294,27 @@ void PerseusGui::on_transverter_clicked()
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()
{
qDebug() << "PerseusGui::updateHardware";

Wyświetl plik

@ -79,10 +79,14 @@ private slots:
void on_LOppm_valueChanged(int value);
void on_resetLOppm_clicked();
void on_sampleRate_currentIndexChanged(int index);
void on_wideband_toggled(bool checked);
void on_decim_currentIndexChanged(int index);
void on_startStop_toggled(bool checked);
void on_record_toggled(bool checked);
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 updateStatus();
void handleInputMessages();

Wyświetl plik

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>324</width>
<height>132</height>
<height>256</height>
</rect>
</property>
<property name="sizePolicy">
@ -276,6 +276,9 @@
<property name="toolTip">
<string>Device sample rate in MS/s</string>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<item>
<property name="text">
<string>0000</string>
@ -290,6 +293,19 @@
</property>
</widget>
</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>
<spacer name="fcPosRightSpacer">
<property name="orientation">
@ -360,22 +376,109 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="paddingLayout">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<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">
<enum>Qt::Vertical</enum>
</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">
<size>
<width>20</width>
<height>40</height>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="paddingLayout"/>
</item>
</layout>
</widget>
<customwidgets>