1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-05 15:34:57 -04:00

KiwiSDR: added a DC block

This commit is contained in:
f4exb
2019-06-09 20:56:22 +02:00
parent 58ee095194
commit 7f97826c58
17 changed files with 80 additions and 7 deletions
@@ -165,6 +165,12 @@ void KiwiSDRGui::on_serverAddressApplyButton_clicked()
sendSettings();
}
void KiwiSDRGui::on_dcBlock_toggled(bool checked)
{
m_settings.m_dcBlock = checked;
sendSettings();
}
void KiwiSDRGui::on_record_toggled(bool checked)
{
if (checked) {
@@ -85,6 +85,7 @@ private slots:
void on_agc_toggled(bool checked);
void on_serverAddress_returnPressed();
void on_serverAddressApplyButton_clicked();
void on_dcBlock_toggled(bool checked);
void openDeviceSettingsDialog(const QPoint& p);
void updateStatus();
void updateHardware();
+11 -1
View File
@@ -32,7 +32,7 @@
</font>
</property>
<property name="windowTitle">
<string>Test source</string>
<string>KiwiSDR</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
@@ -310,6 +310,16 @@
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="dcBlock">
<property name="toolTip">
<string>Automatic DC offset removal</string>
</property>
<property name="text">
<string>DC</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
@@ -302,6 +302,12 @@ bool KiwiSDRInput::applySettings(const KiwiSDRSettings& settings, bool force)
emit setWorkerGain(settings.m_gain, settings.m_useAGC);
}
if (m_settings.m_dcBlock != settings.m_dcBlock)
{
reverseAPIKeys.append("dcBlock");
m_deviceAPI->configureCorrections(settings.m_dcBlock, false);
}
if (m_settings.m_centerFrequency != settings.m_centerFrequency || force)
{
reverseAPIKeys.append("centerFrequency");
@@ -382,6 +388,9 @@ int KiwiSDRInput::webapiSettingsPutPatch(
if (deviceSettingsKeys.contains("useAGC")) {
settings.m_useAGC = response.getKiwiSdrSettings()->getUseAgc();
}
if (deviceSettingsKeys.contains("dcBlock")) {
settings.m_dcBlock = response.getKiwiSdrSettings()->getDcBlock() != 0;
}
if (deviceSettingsKeys.contains("centerFrequency")) {
settings.m_centerFrequency = response.getKiwiSdrSettings()->getCenterFrequency();
}
@@ -432,6 +441,7 @@ void KiwiSDRInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& re
{
response.getKiwiSdrSettings()->setGain(settings.m_gain);
response.getKiwiSdrSettings()->setUseAgc(settings.m_useAGC ? 1 : 0);
response.getKiwiSdrSettings()->setDcBlock(settings.m_dcBlock ? 1 : 0);
response.getKiwiSdrSettings()->setCenterFrequency(settings.m_centerFrequency);
if (response.getKiwiSdrSettings()->getServerAddress()) {
@@ -480,6 +490,9 @@ void KiwiSDRInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys,
if (deviceSettingsKeys.contains("useAGC")) {
swgKiwiSDRSettings->setUseAgc(settings.m_useAGC ? 1 : 0);
}
if (deviceSettingsKeys.contains("dcBlock") || force) {
swgKiwiSDRSettings->setDcBlock(settings.m_dcBlock ? 1 : 0);
}
if (deviceSettingsKeys.contains("centerFrequency") || force) {
swgKiwiSDRSettings->setCenterFrequency(settings.m_centerFrequency);
}
@@ -30,6 +30,7 @@ void KiwiSDRSettings::resetToDefaults()
m_gain = 20;
m_useAGC = true;
m_dcBlock = false;
m_serverAddress = "127.0.0.1:8073";
@@ -25,6 +25,7 @@
struct KiwiSDRSettings {
uint32_t m_gain;
bool m_useAGC;
bool m_dcBlock;
quint64 m_centerFrequency;
QString m_serverAddress;
+6 -2
View File
@@ -2,7 +2,7 @@
<h2>Introduction</h2>
This plugin is designed to enable connection to publicly available [KiwiSDR](http://kiwisdr.com/) receivers. A list of on-line receiver is available [here](https://sdr.hu/?q=kiwisdr)
This plugin is designed to enable connection to publicly available [KiwiSDR](http://kiwisdr.com/) receivers. A list of on-line receivers is available [here](https://sdr.hu/?q=kiwisdr)
<h2>Interface</h2>
@@ -57,4 +57,8 @@ This is the RF gain control sent to the remote
<h3>9: AGC</h3>
Use this button to switch on or off the AGC in the remote
Use this button to switch on or off the AGC in the remote
<h3>10: DC block</h3>
Some remote receivers exhibit a peak at DC. Use this button to filter DC out.