mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 09:18:54 -05:00
WDSP receiver: fixed FM demod amd implement equalizer
This commit is contained in:
parent
8dd46a08ea
commit
a4f08dc210
1
.github/workflows/sdrangel.yml
vendored
1
.github/workflows/sdrangel.yml
vendored
@ -6,6 +6,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- feature-*
|
||||
- mac_ci
|
||||
tags:
|
||||
- 'v*'
|
||||
|
@ -860,7 +860,7 @@ if (FFTW3F_FOUND)
|
||||
set(FT8_SUPPORT ON CACHE INTERNAL "")
|
||||
endif()
|
||||
|
||||
if (FFTW3F_FOUND AND LINUX)
|
||||
if (FFTW3F_FOUND)
|
||||
add_subdirectory(wdsp)
|
||||
add_definitions(-DHAS_WDSP)
|
||||
set(WDSP_SUPPORT ON CACHE INTERNAL "")
|
||||
|
@ -36,6 +36,8 @@ if(NOT SERVER_MODE)
|
||||
wdsprxdnbdialog.ui
|
||||
wdsprxdnrdialog.cpp
|
||||
wdsprxdnrdialog.ui
|
||||
wdsprxeqdialog.cpp
|
||||
wdsprxeqdialog.ui
|
||||
wdsprxfmdialog.cpp
|
||||
wdsprxfmdialog.ui
|
||||
wdsprxsquelchdialog.cpp
|
||||
@ -51,6 +53,7 @@ if(NOT SERVER_MODE)
|
||||
wdsprxcwpeakdialog.h
|
||||
wdsprxdnbdialog.h
|
||||
wdsprxdnrdialog.h
|
||||
wdsprxeqdialog.h
|
||||
wdsprxfmdialog.h
|
||||
wdsprxsquelchdialog.h
|
||||
)
|
||||
|
252
plugins/channelrx/wdsprx/wdsprxeqdialog.cpp
Normal file
252
plugins/channelrx/wdsprx/wdsprxeqdialog.cpp
Normal file
@ -0,0 +1,252 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2024 Edouard Griffiths, F4EXB <f4exb06@gmail.com> //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
#include "wdsprxeqdialog.h"
|
||||
#include "ui_wdsprxeqdialog.h"
|
||||
|
||||
WDSPRxEqDialog::WDSPRxEqDialog(QWidget* parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::WDSPRxEqDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
WDSPRxEqDialog::~WDSPRxEqDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::setEqF(const std::array<float, 11>& eqF)
|
||||
{
|
||||
m_eqF = eqF;
|
||||
ui->f1->blockSignals(true);
|
||||
ui->f2->blockSignals(true);
|
||||
ui->f3->blockSignals(true);
|
||||
ui->f4->blockSignals(true);
|
||||
ui->f5->blockSignals(true);
|
||||
ui->f6->blockSignals(true);
|
||||
ui->f7->blockSignals(true);
|
||||
ui->f8->blockSignals(true);
|
||||
ui->f9->blockSignals(true);
|
||||
ui->f10->blockSignals(true);
|
||||
ui->f1->setValue((int) m_eqF[1]);
|
||||
ui->f2->setValue((int) m_eqF[2]);
|
||||
ui->f3->setValue((int) m_eqF[3]);
|
||||
ui->f4->setValue((int) m_eqF[4]);
|
||||
ui->f5->setValue((int) m_eqF[5]);
|
||||
ui->f6->setValue((int) m_eqF[6]);
|
||||
ui->f7->setValue((int) m_eqF[7]);
|
||||
ui->f8->setValue((int) m_eqF[8]);
|
||||
ui->f9->setValue((int) m_eqF[9]);
|
||||
ui->f10->setValue((int) m_eqF[10]);
|
||||
ui->f1->blockSignals(false);
|
||||
ui->f2->blockSignals(false);
|
||||
ui->f3->blockSignals(false);
|
||||
ui->f4->blockSignals(false);
|
||||
ui->f5->blockSignals(false);
|
||||
ui->f6->blockSignals(false);
|
||||
ui->f7->blockSignals(false);
|
||||
ui->f8->blockSignals(false);
|
||||
ui->f9->blockSignals(false);
|
||||
ui->f10->blockSignals(false);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::setEqG(const std::array<float, 11>& eqG)
|
||||
{
|
||||
m_eqG = eqG;
|
||||
ui->preampGain->blockSignals(true);
|
||||
ui->f1Gain->blockSignals(true);
|
||||
ui->f2Gain->blockSignals(true);
|
||||
ui->f3Gain->blockSignals(true);
|
||||
ui->f4Gain->blockSignals(true);
|
||||
ui->f5Gain->blockSignals(true);
|
||||
ui->f6Gain->blockSignals(true);
|
||||
ui->f7Gain->blockSignals(true);
|
||||
ui->f8Gain->blockSignals(true);
|
||||
ui->f9Gain->blockSignals(true);
|
||||
ui->f10Gain->blockSignals(true);
|
||||
ui->preampGain->setValue((int) m_eqG[0]);
|
||||
ui->f1Gain->setValue((int) m_eqG[1]);
|
||||
ui->f2Gain->setValue((int) m_eqG[2]);
|
||||
ui->f3Gain->setValue((int) m_eqG[3]);
|
||||
ui->f4Gain->setValue((int) m_eqG[4]);
|
||||
ui->f5Gain->setValue((int) m_eqG[5]);
|
||||
ui->f6Gain->setValue((int) m_eqG[6]);
|
||||
ui->f7Gain->setValue((int) m_eqG[7]);
|
||||
ui->f8Gain->setValue((int) m_eqG[8]);
|
||||
ui->f9Gain->setValue((int) m_eqG[9]);
|
||||
ui->f10Gain->setValue((int) m_eqG[10]);
|
||||
ui->preampGain->blockSignals(false);
|
||||
ui->f1Gain->blockSignals(false);
|
||||
ui->f2Gain->blockSignals(false);
|
||||
ui->f3Gain->blockSignals(false);
|
||||
ui->f4Gain->blockSignals(false);
|
||||
ui->f5Gain->blockSignals(false);
|
||||
ui->f6Gain->blockSignals(false);
|
||||
ui->f7Gain->blockSignals(false);
|
||||
ui->f8Gain->blockSignals(false);
|
||||
ui->f9Gain->blockSignals(false);
|
||||
ui->f10Gain->blockSignals(false);
|
||||
ui->preampGainText->setText(tr("%1 dB").arg((int) m_eqG[0]));
|
||||
ui->f1GainText->setText(tr("%1 dB").arg((int) m_eqG[1]));
|
||||
ui->f2GainText->setText(tr("%1 dB").arg((int) m_eqG[2]));
|
||||
ui->f3GainText->setText(tr("%1 dB").arg((int) m_eqG[3]));
|
||||
ui->f4GainText->setText(tr("%1 dB").arg((int) m_eqG[4]));
|
||||
ui->f5GainText->setText(tr("%1 dB").arg((int) m_eqG[5]));
|
||||
ui->f6GainText->setText(tr("%1 dB").arg((int) m_eqG[6]));
|
||||
ui->f7GainText->setText(tr("%1 dB").arg((int) m_eqG[7]));
|
||||
ui->f8GainText->setText(tr("%1 dB").arg((int) m_eqG[8]));
|
||||
ui->f9GainText->setText(tr("%1 dB").arg((int) m_eqG[9]));
|
||||
ui->f10GainText->setText(tr("%1 dB").arg((int) m_eqG[10]));
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f1_valueChanged(int value)
|
||||
{
|
||||
m_eqF[1] = (float) value;
|
||||
emit valueChanged(ChangedFrequency);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f2_valueChanged(int value)
|
||||
{
|
||||
m_eqF[2] = (float) value;
|
||||
emit valueChanged(ChangedFrequency);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f3_valueChanged(int value)
|
||||
{
|
||||
m_eqF[3] = (float) value;
|
||||
emit valueChanged(ChangedFrequency);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f4_valueChanged(int value)
|
||||
{
|
||||
m_eqF[4] = (float) value;
|
||||
emit valueChanged(ChangedFrequency);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f5_valueChanged(int value)
|
||||
{
|
||||
m_eqF[5] = (float) value;
|
||||
emit valueChanged(ChangedFrequency);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f6_valueChanged(int value)
|
||||
{
|
||||
m_eqF[6] = (float) value;
|
||||
emit valueChanged(ChangedFrequency);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f7_valueChanged(int value)
|
||||
{
|
||||
m_eqF[7] = (float) value;
|
||||
emit valueChanged(ChangedFrequency);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f8_valueChanged(int value)
|
||||
{
|
||||
m_eqF[8] = (float) value;
|
||||
emit valueChanged(ChangedFrequency);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f9_valueChanged(int value)
|
||||
{
|
||||
m_eqF[9] = (float) value;
|
||||
emit valueChanged(ChangedFrequency);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f10_valueChanged(int value)
|
||||
{
|
||||
m_eqF[10] = (float) value;
|
||||
emit valueChanged(ChangedFrequency);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_preampGain_valueChanged(int value)
|
||||
{
|
||||
m_eqG[0] = (float) value;
|
||||
ui->preampGainText->setText(tr("%1 dB").arg(value));
|
||||
emit valueChanged(ChangedGain);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f1Gain_valueChanged(int value)
|
||||
{
|
||||
m_eqG[1] = (float) value;
|
||||
ui->f1GainText->setText(tr("%1 dB").arg(value));
|
||||
emit valueChanged(ChangedGain);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f2Gain_valueChanged(int value)
|
||||
{
|
||||
m_eqG[2] = (float) value;
|
||||
ui->f2GainText->setText(tr("%1 dB").arg(value));
|
||||
emit valueChanged(ChangedGain);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f3Gain_valueChanged(int value)
|
||||
{
|
||||
m_eqG[3] = (float) value;
|
||||
ui->f3GainText->setText(tr("%1 dB").arg(value));
|
||||
emit valueChanged(ChangedGain);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f4Gain_valueChanged(int value)
|
||||
{
|
||||
m_eqG[4] = (float) value;
|
||||
ui->f4GainText->setText(tr("%1 dB").arg(value));
|
||||
emit valueChanged(ChangedGain);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f5Gain_valueChanged(int value)
|
||||
{
|
||||
m_eqG[5] = (float) value;
|
||||
ui->f5GainText->setText(tr("%1 dB").arg(value));
|
||||
emit valueChanged(ChangedGain);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f6Gain_valueChanged(int value)
|
||||
{
|
||||
m_eqG[6] = (float) value;
|
||||
ui->f6GainText->setText(tr("%1 dB").arg(value));
|
||||
emit valueChanged(ChangedGain);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f7Gain_valueChanged(int value)
|
||||
{
|
||||
m_eqG[7] = (float) value;
|
||||
ui->f7GainText->setText(tr("%1 dB").arg(value));
|
||||
emit valueChanged(ChangedGain);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f8Gain_valueChanged(int value)
|
||||
{
|
||||
m_eqG[8] = (float) value;
|
||||
ui->f8GainText->setText(tr("%1 dB").arg(value));
|
||||
emit valueChanged(ChangedGain);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f9Gain_valueChanged(int value)
|
||||
{
|
||||
m_eqG[9] = (float) value;
|
||||
ui->f9GainText->setText(tr("%1 dB").arg(value));
|
||||
emit valueChanged(ChangedGain);
|
||||
}
|
||||
|
||||
void WDSPRxEqDialog::on_f10Gain_valueChanged(int value)
|
||||
{
|
||||
m_eqG[10] = (float) value;
|
||||
ui->f10GainText->setText(tr("%1 dB").arg(value));
|
||||
emit valueChanged(ChangedGain);
|
||||
}
|
||||
|
79
plugins/channelrx/wdsprx/wdsprxeqdialog.h
Normal file
79
plugins/channelrx/wdsprx/wdsprxeqdialog.h
Normal file
@ -0,0 +1,79 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2024 Edouard Griffiths, F4EXB <f4exb06@gmail.com> //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef INCLUDE_WDSPRXEQDIALOG_H
|
||||
#define INCLUDE_WDSPRXEQDIALOG_H
|
||||
|
||||
#include <array>
|
||||
#include <QDialog>
|
||||
|
||||
#include "export.h"
|
||||
#include "wdsprxsettings.h"
|
||||
|
||||
namespace Ui {
|
||||
class WDSPRxEqDialog;
|
||||
}
|
||||
|
||||
class SDRGUI_API WDSPRxEqDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum ValueChanged {
|
||||
ChangedFrequency,
|
||||
ChangedGain,
|
||||
};
|
||||
|
||||
explicit WDSPRxEqDialog(QWidget* parent = nullptr);
|
||||
~WDSPRxEqDialog();
|
||||
|
||||
void setEqF(const std::array<float, 11>& eqF);
|
||||
void setEqG(const std::array<float, 11>& eqG);
|
||||
|
||||
const std::array<float, 11>& getEqF() const { return m_eqF; }
|
||||
const std::array<float, 11>& getEqG() const { return m_eqG; }
|
||||
|
||||
signals:
|
||||
void valueChanged(int valueChanged);
|
||||
|
||||
private:
|
||||
Ui::WDSPRxEqDialog *ui;
|
||||
std::array<float, 11> m_eqF;
|
||||
std::array<float, 11> m_eqG;
|
||||
|
||||
private slots:
|
||||
void on_f1_valueChanged(int value);
|
||||
void on_f2_valueChanged(int value);
|
||||
void on_f3_valueChanged(int value);
|
||||
void on_f4_valueChanged(int value);
|
||||
void on_f5_valueChanged(int value);
|
||||
void on_f6_valueChanged(int value);
|
||||
void on_f7_valueChanged(int value);
|
||||
void on_f8_valueChanged(int value);
|
||||
void on_f9_valueChanged(int value);
|
||||
void on_f10_valueChanged(int value);
|
||||
void on_preampGain_valueChanged(int value);
|
||||
void on_f1Gain_valueChanged(int value);
|
||||
void on_f2Gain_valueChanged(int value);
|
||||
void on_f3Gain_valueChanged(int value);
|
||||
void on_f4Gain_valueChanged(int value);
|
||||
void on_f5Gain_valueChanged(int value);
|
||||
void on_f6Gain_valueChanged(int value);
|
||||
void on_f7Gain_valueChanged(int value);
|
||||
void on_f8Gain_valueChanged(int value);
|
||||
void on_f9Gain_valueChanged(int value);
|
||||
void on_f10Gain_valueChanged(int value);
|
||||
};
|
||||
|
||||
#endif
|
889
plugins/channelrx/wdsprx/wdsprxeqdialog.ui
Normal file
889
plugins/channelrx/wdsprx/wdsprxeqdialog.ui
Normal file
@ -0,0 +1,889 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>WDSPRxEqDialog</class>
|
||||
<widget class="QDialog" name="WDSPRxEqDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>410</width>
|
||||
<height>440</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Equalizer settings</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="eqLayout">
|
||||
<item row="7" column="3">
|
||||
<widget class="QLabel" name="f7GainText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>00 dB</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="f3">
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #3 (Hz)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>95</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>187</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>125</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QSpinBox" name="f6">
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #6 (Hz)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>751</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1500</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="f5Label">
|
||||
<property name="text">
|
||||
<string>f5 (Hz)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QSpinBox" name="f7">
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #7 (Hz)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1501</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>3000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>2000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="f7Label">
|
||||
<property name="text">
|
||||
<string>f7 (Hz)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="TickedSlider" name="f4Gain">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #4 gain (dB)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-15</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="f4Label">
|
||||
<property name="text">
|
||||
<string>f4 (Hz)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QSpinBox" name="f5">
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #5 (Hz)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>376</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>750</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>500</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="TickedSlider" name="preampGain">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Preamp gain (dB)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-15</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QSpinBox" name="f8">
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #8 (Hz)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>3001</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>6000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>4000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="3">
|
||||
<widget class="QLabel" name="f8GainText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>00 dB</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QLabel" name="f4GainText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>00 dB</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="preampLabel">
|
||||
<property name="text">
|
||||
<string>Preamp</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="TickedSlider" name="f1Gain">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #1 gain (dB)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-15</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="f2Label">
|
||||
<property name="text">
|
||||
<string>f2 (Hz)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="TickedSlider" name="f7Gain">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #7 gain (dB)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-15</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="TickedSlider" name="f5Gain">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #5 gain (dB)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-15</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<widget class="TickedSlider" name="f8Gain">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #8 gain (dB)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-15</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="f6Label">
|
||||
<property name="text">
|
||||
<string>f6 (Hz)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="f2">
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #2 (Hz)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>49</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>94</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>63</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="f9Label">
|
||||
<property name="text">
|
||||
<string>f9 (Hz)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="f8Label">
|
||||
<property name="text">
|
||||
<string>f8 (Hz)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="f1">
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #1 (Hz)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>48</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>32</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="3">
|
||||
<widget class="QLabel" name="f9GainText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>00 dB</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="f3Label">
|
||||
<property name="text">
|
||||
<string>f3 (Hz)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="TickedSlider" name="f2Gain">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #2 gain (dB)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-15</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLabel" name="f2GainText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>00 dB</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="preampGainText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>00 dB</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QLabel" name="f3GainText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>00 dB</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="2">
|
||||
<widget class="TickedSlider" name="f9Gain">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #9 gain (dB)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-15</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="3">
|
||||
<widget class="QLabel" name="f6GainText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>00 dB</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QSpinBox" name="f4">
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #4 (Hz)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>188</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>375</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>250</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QSpinBox" name="f9">
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #9 (Hz)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>6001</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>12000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>8000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="f1GainText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>00 dB</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="TickedSlider" name="f3Gain">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #3 gain (dB)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-15</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="3">
|
||||
<widget class="QLabel" name="f5GainText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>00 dB</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="TickedSlider" name="f6Gain">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #6 gain (dB)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-15</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="f1Label">
|
||||
<property name="text">
|
||||
<string>f1 (Hz)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="f10Label">
|
||||
<property name="text">
|
||||
<string>f10 (Hz)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QSpinBox" name="f10">
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #10 (Hz)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>12001</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>20000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>16000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="2">
|
||||
<widget class="TickedSlider" name="f10Gain">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Frequency point #10 gain (dB)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-15</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="3">
|
||||
<widget class="QLabel" name="f10GainText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>00 dB</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Close</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>TickedSlider</class>
|
||||
<extends>QSlider</extends>
|
||||
<header>gui/tickedslider.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>WDSPRxEqDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>WDSPRxEqDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
@ -50,9 +50,18 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="deviationText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>20.0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@ -262,23 +271,32 @@
|
||||
<string>AF volume limter gain (dB)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-30</number>
|
||||
<number>-80</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>30</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
<number>-40</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="afLimiterGainText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>20</string>
|
||||
<string>-40</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "wdsprxfmdialog.h"
|
||||
#include "wdsprxcwpeakdialog.h"
|
||||
#include "wdsprxsquelchdialog.h"
|
||||
#include "wdsprxeqdialog.h"
|
||||
|
||||
WDSPRxGUI* WDSPRxGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
@ -341,17 +342,28 @@ void WDSPRxGUI::on_profileIndex_valueChanged(int value)
|
||||
m_settings.m_fmCTCSSNotchFrequency = m_settings.m_profiles[m_settings.m_profileIndex].m_fmCTCSSNotchFrequency;
|
||||
// Squelch
|
||||
m_settings.m_squelch = m_settings.m_profiles[m_settings.m_profileIndex].m_squelch;
|
||||
m_settings.m_squelchThreshold = m_settings.m_profiles[m_settings.m_profileIndex].m_squelchThreshold;
|
||||
m_settings.m_squelchMode = m_settings.m_profiles[m_settings.m_profileIndex].m_squelchMode;
|
||||
m_settings.m_ssqlTauMute = m_settings.m_profiles[m_settings.m_profileIndex].m_ssqlTauMute;
|
||||
m_settings.m_ssqlTauUnmute = m_settings.m_profiles[m_settings.m_profileIndex].m_ssqlTauUnmute;
|
||||
m_settings.m_amsqMaxTail = m_settings.m_profiles[m_settings.m_profileIndex].m_amsqMaxTail;
|
||||
// Equalizer
|
||||
m_settings.m_equalizer = m_settings.m_profiles[m_settings.m_profileIndex].m_equalizer;
|
||||
m_settings.m_eqF = m_settings.m_profiles[m_settings.m_profileIndex].m_eqF;
|
||||
m_settings.m_eqG = m_settings.m_profiles[m_settings.m_profileIndex].m_eqG;
|
||||
displaySettings();
|
||||
applyBandwidths(m_settings.m_profiles[m_settings.m_profileIndex].m_spanLog2, true); // does applySettings(true)
|
||||
}
|
||||
|
||||
void WDSPRxGUI::on_demod_currentIndexChanged(int index)
|
||||
{
|
||||
m_settings.m_demod = (WDSPRxProfile::WDSPRxDemod) index;
|
||||
WDSPRxProfile::WDSPRxDemod demod = (WDSPRxProfile::WDSPRxDemod) index;
|
||||
|
||||
if ((m_settings.m_demod != WDSPRxProfile::DemodSSB) && (demod == WDSPRxProfile::DemodSSB)) {
|
||||
m_settings.m_dsb = false;
|
||||
}
|
||||
|
||||
m_settings.m_demod = demod;
|
||||
m_settings.m_profiles[m_settings.m_profileIndex].m_demod = m_settings.m_demod;
|
||||
|
||||
switch(m_settings.m_demod)
|
||||
@ -482,6 +494,9 @@ WDSPRxGUI::WDSPRxGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
|
||||
CRightClickEnabler *squelchRightClickEnabler = new CRightClickEnabler(ui->squelch);
|
||||
connect(squelchRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(squelchSetupDialog(const QPoint &)));
|
||||
|
||||
CRightClickEnabler *equalizerRightClickEnabler = new CRightClickEnabler(ui->equalizer);
|
||||
connect(equalizerRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(equalizerSetupDialog(const QPoint &)));
|
||||
|
||||
CRightClickEnabler *demodRightClickEnabler = new CRightClickEnabler(ui->demod);
|
||||
connect(demodRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(demodSetupDialog(const QPoint &)));
|
||||
|
||||
@ -757,6 +772,7 @@ void WDSPRxGUI::displaySettings()
|
||||
ui->squelch->setChecked(m_settings.m_squelch);
|
||||
ui->squelchThreshold->setValue(m_settings.m_squelchThreshold);
|
||||
ui->squelchThresholdText->setText(tr("%1").arg(m_settings.m_squelchThreshold));
|
||||
ui->equalizer->setChecked(m_settings.m_equalizer);
|
||||
ui->audioBinaural->setChecked(m_settings.m_audioBinaural);
|
||||
ui->audioFlipChannels->setChecked(m_settings.m_audioFlipChannels);
|
||||
ui->audioMute->setChecked(m_settings.m_audioMute);
|
||||
@ -1208,6 +1224,44 @@ void WDSPRxGUI::squelchSetup(int iValueChanged)
|
||||
}
|
||||
}
|
||||
|
||||
void WDSPRxGUI::equalizerSetupDialog(const QPoint& p)
|
||||
{
|
||||
m_equalizerDialog = new WDSPRxEqDialog();
|
||||
m_equalizerDialog->move(p);
|
||||
m_equalizerDialog->setEqF(m_settings.m_eqF);
|
||||
m_equalizerDialog->setEqG(m_settings.m_eqG);
|
||||
QObject::connect(m_equalizerDialog, &WDSPRxEqDialog::valueChanged, this, &WDSPRxGUI::equalizerSetup);
|
||||
m_equalizerDialog->exec();
|
||||
QObject::disconnect(m_equalizerDialog, &WDSPRxEqDialog::valueChanged, this, &WDSPRxGUI::equalizerSetup);
|
||||
m_equalizerDialog->deleteLater();
|
||||
m_equalizerDialog = nullptr;
|
||||
}
|
||||
|
||||
void WDSPRxGUI::equalizerSetup(int iValueChanged)
|
||||
{
|
||||
if (!m_equalizerDialog) {
|
||||
return;
|
||||
}
|
||||
|
||||
WDSPRxEqDialog::ValueChanged valueChanged = (WDSPRxEqDialog::ValueChanged) iValueChanged;
|
||||
|
||||
switch (valueChanged)
|
||||
{
|
||||
case WDSPRxEqDialog::ChangedFrequency:
|
||||
m_settings.m_eqF = m_equalizerDialog->getEqF();
|
||||
m_settings.m_profiles[m_settings.m_profileIndex].m_eqF = m_settings.m_eqF;
|
||||
applySettings();
|
||||
break;
|
||||
case WDSPRxEqDialog::ChangedGain:
|
||||
m_settings.m_eqG = m_equalizerDialog->getEqG();
|
||||
m_settings.m_profiles[m_settings.m_profileIndex].m_eqG = m_settings.m_eqG;
|
||||
applySettings();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void WDSPRxGUI::tick()
|
||||
{
|
||||
double powDbAvg, powDbPeak;
|
||||
|
@ -41,6 +41,7 @@ class WDSPRxAMDialog;
|
||||
class WDSPRxFMDialog;
|
||||
class WDSPRxCWPeakDialog;
|
||||
class WDSPRxSquelchDialog;
|
||||
class WDSPRxEqDialog;
|
||||
class SpectrumVis;
|
||||
class BasebandSampleSink;
|
||||
|
||||
@ -103,6 +104,7 @@ private:
|
||||
WDSPRxFMDialog* m_fmDialog;
|
||||
WDSPRxCWPeakDialog* m_cwPeakDialog;
|
||||
WDSPRxSquelchDialog* m_squelchDialog;
|
||||
WDSPRxEqDialog* m_equalizerDialog;
|
||||
|
||||
QIcon m_iconDSBUSB;
|
||||
QIcon m_iconDSBLSB;
|
||||
@ -144,6 +146,7 @@ private slots:
|
||||
void on_cwPeaking_toggled(bool checked);
|
||||
void on_squelch_toggled(bool checked);
|
||||
void on_squelchThreshold_valueChanged(int value);
|
||||
void on_equalizer_toggled(bool checked);
|
||||
void onWidgetRolled(QWidget* widget, bool rollDown);
|
||||
void onMenuDialogCalled(const QPoint& p);
|
||||
void handleInputMessages();
|
||||
@ -161,6 +164,8 @@ private slots:
|
||||
void fmSetup(int valueChanged);
|
||||
void squelchSetupDialog(const QPoint& p);
|
||||
void squelchSetup(int valueChanged);
|
||||
void equalizerSetupDialog(const QPoint& p);
|
||||
void equalizerSetup(int valueChanged);
|
||||
void tick();
|
||||
};
|
||||
|
||||
|
@ -993,6 +993,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="ButtonSwitch" name="equalizer">
|
||||
<property name="toolTip">
|
||||
<string>Toggle equalizer (righ-click for options)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>EQ</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
|
@ -79,8 +79,8 @@ void WDSPRxSettings::resetToDefaults()
|
||||
m_fmDeviation = 2500.0;
|
||||
m_fmAFLow = 300.0;
|
||||
m_fmAFHigh = 3000.0;
|
||||
m_fmAFLimiter = false;
|
||||
m_fmAFLimiterGain = 10.0;
|
||||
m_fmAFLimiter = true;
|
||||
m_fmAFLimiterGain = -40.0;
|
||||
m_fmCTCSSNotch = false;
|
||||
m_fmCTCSSNotchFrequency = 67.0;
|
||||
// Squelch
|
||||
@ -90,6 +90,10 @@ void WDSPRxSettings::resetToDefaults()
|
||||
m_ssqlTauMute = 0.1;
|
||||
m_ssqlTauUnmute = 0.1;
|
||||
m_amsqMaxTail = 1.5;
|
||||
// Equalizer
|
||||
m_equalizer = false;
|
||||
m_eqF = {0.0, 32.0, 63.0, 125.0, 250.0, 500.0, 1000.0, 2000.0, 4000.0, 8000.0, 16000.0};
|
||||
m_eqG = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
|
||||
//
|
||||
m_volume = 1.0;
|
||||
m_inputFrequencyOffset = 0;
|
||||
@ -166,6 +170,30 @@ QByteArray WDSPRxSettings::serialize() const
|
||||
s.writeDouble(63, m_ssqlTauMute);
|
||||
s.writeDouble(64, m_ssqlTauUnmute);
|
||||
s.writeDouble(65, m_amsqMaxTail);
|
||||
// Equalizer
|
||||
s.writeBool( 90, m_equalizer);
|
||||
s.writeFloat(4000, m_eqF[0]);
|
||||
s.writeFloat(4001, m_eqF[1]);
|
||||
s.writeFloat(4002, m_eqF[2]);
|
||||
s.writeFloat(4003, m_eqF[3]);
|
||||
s.writeFloat(4004, m_eqF[4]);
|
||||
s.writeFloat(4005, m_eqF[5]);
|
||||
s.writeFloat(4006, m_eqF[6]);
|
||||
s.writeFloat(4007, m_eqF[7]);
|
||||
s.writeFloat(4008, m_eqF[8]);
|
||||
s.writeFloat(4009, m_eqF[9]);
|
||||
s.writeFloat(4010, m_eqF[10]);
|
||||
s.writeFloat(4020, m_eqG[0]);
|
||||
s.writeFloat(4021, m_eqG[1]);
|
||||
s.writeFloat(4022, m_eqG[2]);
|
||||
s.writeFloat(4023, m_eqG[3]);
|
||||
s.writeFloat(4024, m_eqG[4]);
|
||||
s.writeFloat(4025, m_eqG[5]);
|
||||
s.writeFloat(4026, m_eqG[6]);
|
||||
s.writeFloat(4027, m_eqG[7]);
|
||||
s.writeFloat(4028, m_eqG[8]);
|
||||
s.writeFloat(4029, m_eqG[9]);
|
||||
s.writeFloat(4030, m_eqG[10]);
|
||||
//
|
||||
s.writeString(70, m_title);
|
||||
s.writeString(71, m_audioDeviceName);
|
||||
@ -237,6 +265,30 @@ QByteArray WDSPRxSettings::serialize() const
|
||||
s.writeDouble(163 + 100*i, m_profiles[i].m_ssqlTauMute);
|
||||
s.writeDouble(164 + 100*i, m_profiles[i].m_ssqlTauUnmute);
|
||||
s.writeDouble(165 + 100*i, m_profiles[i].m_amsqMaxTail);
|
||||
// Equalizer
|
||||
s.writeBool( 190 + 100*i, m_profiles[i].m_equalizer);
|
||||
s.writeFloat(4100 + 100*i, m_profiles[i].m_eqF[0]);
|
||||
s.writeFloat(4101 + 100*i, m_profiles[i].m_eqF[1]);
|
||||
s.writeFloat(4102 + 100*i, m_profiles[i].m_eqF[2]);
|
||||
s.writeFloat(4103 + 100*i, m_profiles[i].m_eqF[3]);
|
||||
s.writeFloat(4104 + 100*i, m_profiles[i].m_eqF[4]);
|
||||
s.writeFloat(4105 + 100*i, m_profiles[i].m_eqF[5]);
|
||||
s.writeFloat(4106 + 100*i, m_profiles[i].m_eqF[6]);
|
||||
s.writeFloat(4107 + 100*i, m_profiles[i].m_eqF[7]);
|
||||
s.writeFloat(4108 + 100*i, m_profiles[i].m_eqF[8]);
|
||||
s.writeFloat(4109 + 100*i, m_profiles[i].m_eqF[9]);
|
||||
s.writeFloat(4110 + 100*i, m_profiles[i].m_eqF[10]);
|
||||
s.writeFloat(4120 + 100*i, m_profiles[i].m_eqG[0]);
|
||||
s.writeFloat(4121 + 100*i, m_profiles[i].m_eqG[1]);
|
||||
s.writeFloat(4122 + 100*i, m_profiles[i].m_eqG[2]);
|
||||
s.writeFloat(4123 + 100*i, m_profiles[i].m_eqG[3]);
|
||||
s.writeFloat(4124 + 100*i, m_profiles[i].m_eqG[4]);
|
||||
s.writeFloat(4125 + 100*i, m_profiles[i].m_eqG[5]);
|
||||
s.writeFloat(4126 + 100*i, m_profiles[i].m_eqG[6]);
|
||||
s.writeFloat(4127 + 100*i, m_profiles[i].m_eqG[7]);
|
||||
s.writeFloat(4128 + 100*i, m_profiles[i].m_eqG[8]);
|
||||
s.writeFloat(4129 + 100*i, m_profiles[i].m_eqG[9]);
|
||||
s.writeFloat(4130 + 100*i, m_profiles[i].m_eqG[10]);
|
||||
}
|
||||
|
||||
return s.final();
|
||||
@ -315,8 +367,8 @@ bool WDSPRxSettings::deserialize(const QByteArray& data)
|
||||
d.readDouble(45, &m_fmDeviation, 2500.0);
|
||||
d.readDouble(46, &m_fmAFLow, 300.0);
|
||||
d.readDouble(47, &m_fmAFHigh, 3000.0);
|
||||
d.readBool( 48, &m_fmAFLimiter, false);
|
||||
d.readDouble(49, &m_fmAFLimiterGain, 10.0);
|
||||
d.readBool( 48, &m_fmAFLimiter, true);
|
||||
d.readDouble(49, &m_fmAFLimiterGain, -40.0);
|
||||
d.readBool( 50, &m_fmCTCSSNotch, false);
|
||||
d.readDouble(51, &m_fmCTCSSNotchFrequency, 67.0);
|
||||
// Squelch
|
||||
@ -358,6 +410,30 @@ bool WDSPRxSettings::deserialize(const QByteArray& data)
|
||||
d.readU32( 82, &utmp, 0);
|
||||
m_profileIndex = utmp < 10 ? utmp : 0;
|
||||
|
||||
d.readBool( 90, &m_equalizer, false);
|
||||
d.readFloat(4000, &m_eqF[0], 0.0);
|
||||
d.readFloat(4001, &m_eqF[1], 32.0);
|
||||
d.readFloat(4002, &m_eqF[2], 63.0);
|
||||
d.readFloat(4003, &m_eqF[3], 125.0);
|
||||
d.readFloat(4004, &m_eqF[4], 250.0);
|
||||
d.readFloat(4005, &m_eqF[5], 500.0);
|
||||
d.readFloat(4006, &m_eqF[6], 1000.0);
|
||||
d.readFloat(4007, &m_eqF[7], 2000.0);
|
||||
d.readFloat(4008, &m_eqF[8], 4000.0);
|
||||
d.readFloat(4009, &m_eqF[9], 8000.0);
|
||||
d.readFloat(4010, &m_eqF[10], 16000.0);
|
||||
d.readFloat(4020, &m_eqG[0], 0);
|
||||
d.readFloat(4021, &m_eqG[1], 0);
|
||||
d.readFloat(4022, &m_eqG[2], 0);
|
||||
d.readFloat(4023, &m_eqG[3], 0);
|
||||
d.readFloat(4024, &m_eqG[4], 0);
|
||||
d.readFloat(4025, &m_eqG[5], 0);
|
||||
d.readFloat(4026, &m_eqG[6], 0);
|
||||
d.readFloat(4027, &m_eqG[7], 0);
|
||||
d.readFloat(4028, &m_eqG[8], 0);
|
||||
d.readFloat(4029, &m_eqG[9], 0);
|
||||
d.readFloat(4030, &m_eqG[10], 0);
|
||||
|
||||
for (unsigned int i = 0; (i < 10); i++)
|
||||
{
|
||||
d.readS32 (104 + 100*i, &tmp, 9);
|
||||
@ -409,8 +485,8 @@ bool WDSPRxSettings::deserialize(const QByteArray& data)
|
||||
d.readDouble(145 + 100*i, &m_profiles[i].m_fmDeviation, 2500.0);
|
||||
d.readDouble(146 + 100*i, &m_profiles[i].m_fmAFLow, 300.0);
|
||||
d.readDouble(147 + 100*i, &m_profiles[i].m_fmAFHigh, 3000.0);
|
||||
d.readBool( 148 + 100*i, &m_profiles[i].m_fmAFLimiter, false);
|
||||
d.readDouble(149 + 100*i, &m_profiles[i].m_fmAFLimiterGain, 10.0);
|
||||
d.readBool( 148 + 100*i, &m_profiles[i].m_fmAFLimiter, true);
|
||||
d.readDouble(149 + 100*i, &m_profiles[i].m_fmAFLimiterGain, -40.0);
|
||||
d.readBool( 150 + 100*i, &m_profiles[i].m_fmCTCSSNotch, false);
|
||||
d.readDouble(151 + 100*i, &m_profiles[i].m_fmCTCSSNotchFrequency, 67.0);
|
||||
// Squelch
|
||||
@ -421,6 +497,30 @@ bool WDSPRxSettings::deserialize(const QByteArray& data)
|
||||
d.readDouble(163 + 100*i, &m_profiles[i].m_ssqlTauMute, 0.1);
|
||||
d.readDouble(164 + 100*i, &m_profiles[i].m_ssqlTauUnmute, 0.1);
|
||||
d.readDouble(165 + 100*i, &m_profiles[i].m_amsqMaxTail, 1.5);
|
||||
// Equalizer
|
||||
d.readBool( 190 + 100*i, &m_profiles[i].m_equalizer, false);
|
||||
d.readFloat(4100 + 100*i, &m_profiles[i].m_eqF[0], 0.0);
|
||||
d.readFloat(4101 + 100*i, &m_profiles[i].m_eqF[1], 32.0);
|
||||
d.readFloat(4102 + 100*i, &m_profiles[i].m_eqF[2], 63.0);
|
||||
d.readFloat(4103 + 100*i, &m_profiles[i].m_eqF[3], 125.0);
|
||||
d.readFloat(4104 + 100*i, &m_profiles[i].m_eqF[4], 250.0);
|
||||
d.readFloat(4105 + 100*i, &m_profiles[i].m_eqF[5], 500.0);
|
||||
d.readFloat(4106 + 100*i, &m_profiles[i].m_eqF[6], 1000.0);
|
||||
d.readFloat(4107 + 100*i, &m_profiles[i].m_eqF[7], 2000.0);
|
||||
d.readFloat(4108 + 100*i, &m_profiles[i].m_eqF[8], 4000.0);
|
||||
d.readFloat(4109 + 100*i, &m_profiles[i].m_eqF[9], 8000.0);
|
||||
d.readFloat(4110 + 100*i, &m_profiles[i].m_eqF[10], 16000.0);
|
||||
d.readFloat(4120 + 100*i, &m_profiles[i].m_eqG[0], 0.0);
|
||||
d.readFloat(4121 + 100*i, &m_profiles[i].m_eqG[1], 0.0);
|
||||
d.readFloat(4122 + 100*i, &m_profiles[i].m_eqG[2], 0.0);
|
||||
d.readFloat(4123 + 100*i, &m_profiles[i].m_eqG[3], 0.0);
|
||||
d.readFloat(4124 + 100*i, &m_profiles[i].m_eqG[4], 0.0);
|
||||
d.readFloat(4125 + 100*i, &m_profiles[i].m_eqG[5], 0.0);
|
||||
d.readFloat(4126 + 100*i, &m_profiles[i].m_eqG[6], 0.0);
|
||||
d.readFloat(4127 + 100*i, &m_profiles[i].m_eqG[7], 0.0);
|
||||
d.readFloat(4128 + 100*i, &m_profiles[i].m_eqG[8], 0.0);
|
||||
d.readFloat(4129 + 100*i, &m_profiles[i].m_eqG[9], 0.0);
|
||||
d.readFloat(4130 + 100*i, &m_profiles[i].m_eqG[10], 0.0);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -1,422 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2024 Edouard Griffiths, F4EXB <f4exb06@gmail.com> //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <QColor>
|
||||
|
||||
#include "audio/audiodevicemanager.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "wdsprxsettings.h"
|
||||
|
||||
#ifdef SDR_RX_SAMPLE_24BIT
|
||||
const int WDSPRxSettings::m_minPowerThresholdDB = -120;
|
||||
const float WDSPRxSettings::m_mminPowerThresholdDBf = 120.0f;
|
||||
#else
|
||||
const int WDSPRxSettings::m_minPowerThresholdDB = -100;
|
||||
const float WDSPRxSettings::m_mminPowerThresholdDBf = 100.0f;
|
||||
#endif
|
||||
|
||||
WDSPRxSettings::WDSPRxSettings() :
|
||||
m_channelMarker(nullptr),
|
||||
m_spectrumGUI(nullptr),
|
||||
m_rollupState(nullptr)
|
||||
{
|
||||
m_profiles.resize(10);
|
||||
resetToDefaults();
|
||||
}
|
||||
|
||||
void WDSPRxSettings::resetToDefaults()
|
||||
{
|
||||
m_demod = WDSPRxProfile::DemodSSB;
|
||||
m_audioBinaural = false;
|
||||
m_audioFlipChannels = false;
|
||||
m_dsb = false;
|
||||
m_audioMute = false;
|
||||
// AGC
|
||||
m_agc = false;
|
||||
m_agcMode = WDSPRxProfile::AGCMedium;
|
||||
m_agcGain = 80;
|
||||
m_agcSlope = 35; // 3.5 dB
|
||||
m_agcHangThreshold = 0;
|
||||
// Noise blanker
|
||||
m_dnb = false;
|
||||
m_nbScheme = WDSPRxProfile::WDSPRxNBScheme::NBSchemeNB;
|
||||
m_nb2Mode = WDSPRxProfile::WDSPRxNB2Mode::NB2ModeZero;
|
||||
m_nbSlewTime = 0.1;
|
||||
m_nbLeadTime = 0.1;
|
||||
m_nbLagTime = 0.1;
|
||||
m_nbThreshold = 30;
|
||||
m_nbAvgTime = 50.0;
|
||||
// Noise reduction
|
||||
m_dnr = false;
|
||||
m_anf = false;
|
||||
m_nrScheme = WDSPRxProfile::NRSchemeNR;
|
||||
m_nr2Gain = WDSPRxProfile::NR2GainGamma;
|
||||
m_nr2NPE = WDSPRxProfile::NR2NPEOSMS;
|
||||
m_nrPosition = WDSPRxProfile::NRPositionPreAGC;
|
||||
m_nr2ArtifactReduction = true;
|
||||
// Demods
|
||||
m_amFadeLevel = false;
|
||||
m_cwPeaking = false;
|
||||
m_cwPeakFrequency = 600.0;
|
||||
m_cwBandwidth = 100.0;
|
||||
m_cwGain = 2.0;
|
||||
m_fmDeviation = 2500.0;
|
||||
m_fmAFLow = 300.0;
|
||||
m_fmAFHigh = 3000.0;
|
||||
m_fmAFLimiter = false;
|
||||
m_fmAFLimiterGain = 10.0;
|
||||
m_fmCTCSSNotch = false;
|
||||
m_fmCTCSSNotchFrequency = 67.0;
|
||||
// Squelch
|
||||
m_squelch = false;
|
||||
m_squelchThreshold = 3;
|
||||
m_squelchMode = WDSPRxProfile::SquelchModeVoice;
|
||||
m_ssqlTauMute = 0.1;
|
||||
m_ssqlTauUnmute = 0.1;
|
||||
m_amsqMaxTail = 1.5;
|
||||
//
|
||||
m_volume = 1.0;
|
||||
m_inputFrequencyOffset = 0;
|
||||
m_rgbColor = QColor(0, 255, 196).rgb();
|
||||
m_title = "WDSP Receiver";
|
||||
m_audioDeviceName = AudioDeviceManager::m_defaultDeviceName;
|
||||
m_streamIndex = 0;
|
||||
m_useReverseAPI = false;
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_reverseAPIChannelIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
m_hidden = false;
|
||||
m_profileIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray WDSPRxSettings::serialize() const
|
||||
{
|
||||
SimpleSerializer s(1);
|
||||
s.writeS32( 1, m_inputFrequencyOffset);
|
||||
s.writeS32( 2, (int) m_demod);
|
||||
s.writeS32( 3, m_volume * 10.0);
|
||||
|
||||
if (m_spectrumGUI) {
|
||||
s.writeBlob(4, m_spectrumGUI->serialize());
|
||||
}
|
||||
|
||||
s.writeU32( 5, m_rgbColor);
|
||||
s.writeBool( 8, m_audioBinaural);
|
||||
s.writeBool( 9, m_audioFlipChannels);
|
||||
s.writeBool( 10, m_dsb);
|
||||
// AGC
|
||||
s.writeBool( 11, m_agc);
|
||||
s.writeS32( 12, (int) m_agcMode);
|
||||
s.writeS32( 13, m_agcGain);
|
||||
s.writeS32( 14, m_agcSlope);
|
||||
s.writeS32( 15, m_agcHangThreshold);
|
||||
// Noise blanker
|
||||
s.writeBool( 20, m_dnb);
|
||||
s.writeS32( 21, (int) m_nbScheme);
|
||||
s.writeS32( 22, (int) m_nb2Mode);
|
||||
s.writeDouble(23, m_nbSlewTime);
|
||||
s.writeDouble(24, m_nbLeadTime);
|
||||
s.writeDouble(25, m_nbLagTime);
|
||||
s.writeS32( 26, m_nbThreshold);
|
||||
s.writeDouble(27, m_nbAvgTime);
|
||||
// Noise reduction
|
||||
s.writeBool( 30, m_dnr);
|
||||
s.writeBool( 32, m_anf);
|
||||
s.writeS32( 33, (int) m_nrScheme);
|
||||
s.writeS32( 34, (int) m_nr2Gain);
|
||||
s.writeS32( 35, (int) m_nr2NPE);
|
||||
s.writeS32( 36, (int) m_nrPosition);
|
||||
s.writeBool( 37, m_nr2ArtifactReduction);
|
||||
// Demods
|
||||
s.writeBool( 40, m_amFadeLevel);
|
||||
s.writeBool( 41, m_cwPeaking);
|
||||
s.writeDouble(42, m_cwPeakFrequency);
|
||||
s.writeDouble(43, m_cwBandwidth);
|
||||
s.writeDouble(44, m_cwGain);
|
||||
s.writeDouble(45, m_fmDeviation);
|
||||
s.writeDouble(46, m_fmAFLow);
|
||||
s.writeDouble(47, m_fmAFHigh);
|
||||
s.writeBool( 48, m_fmAFLimiter);
|
||||
s.writeDouble(49, m_fmAFLimiterGain);
|
||||
s.writeBool( 50, m_fmCTCSSNotch);
|
||||
s.writeDouble(51, m_fmCTCSSNotchFrequency);
|
||||
// Squelch
|
||||
s.writeBool( 60, m_squelch);
|
||||
s.writeS32( 61, m_squelchThreshold);
|
||||
s.writeDouble(62, m_ssqlTauMute);
|
||||
s.writeDouble(63, m_ssqlTauUnmute);
|
||||
s.writeDouble(64, m_amsqMaxTail);
|
||||
//
|
||||
s.writeString(70, m_title);
|
||||
s.writeString(71, m_audioDeviceName);
|
||||
s.writeBool( 72, m_useReverseAPI);
|
||||
s.writeString(73, m_reverseAPIAddress);
|
||||
s.writeU32( 74, m_reverseAPIPort);
|
||||
s.writeU32( 75, m_reverseAPIDeviceIndex);
|
||||
s.writeU32( 76, m_reverseAPIChannelIndex);
|
||||
s.writeS32( 77, m_streamIndex);
|
||||
|
||||
if (m_rollupState) {
|
||||
s.writeBlob(78, m_rollupState->serialize());
|
||||
}
|
||||
|
||||
s.writeS32( 79, m_workspaceIndex);
|
||||
s.writeBlob( 80, m_geometryBytes);
|
||||
s.writeBool( 81, m_hidden);
|
||||
s.writeU32( 82, m_profileIndex);
|
||||
|
||||
for (unsigned int i = 0; i < 10; i++)
|
||||
{
|
||||
s.writeS32 (104 + 100*i, (int) m_profiles[i].m_demod);
|
||||
// Filter
|
||||
s.writeS32 (100 + 100*i, m_profiles[i].m_spanLog2);
|
||||
s.writeS32 (101 + 100*i, m_profiles[i].m_highCutoff / 100.0);
|
||||
s.writeS32 (102 + 100*i, m_profiles[i].m_lowCutoff / 100.0);
|
||||
s.writeS32 (103 + 100*i, m_profiles[i].m_fftWindow);
|
||||
// AGC
|
||||
s.writeBool (110 + 100*i, m_profiles[i].m_agc);
|
||||
s.writeS32 (111 + 100*i, (int) m_profiles[i].m_agcMode);
|
||||
s.writeS32 (112 + 100*i, m_profiles[i].m_agcGain);
|
||||
s.writeS32 (113 + 100*i, m_profiles[i].m_agcSlope);
|
||||
s.writeS32 (114 + 100*i, m_profiles[i].m_agcHangThreshold);
|
||||
// Noise blanjer
|
||||
s.writeBool (120 + 100*i, m_profiles[i].m_dnb);
|
||||
s.writeS32 (121 + 100*i, (int) m_profiles[i].m_nbScheme);
|
||||
s.writeS32 (122 + 100*i, (int) m_profiles[i].m_nb2Mode);
|
||||
s.writeDouble(123 + 100*i, m_profiles[i].m_nbSlewTime);
|
||||
s.writeDouble(124 + 100*i, m_profiles[i].m_nbLeadTime);
|
||||
s.writeDouble(125 + 100*i, m_profiles[i].m_nbLagTime);
|
||||
s.writeS32 (126 + 100*i, m_profiles[i].m_nbThreshold);
|
||||
s.writeDouble(127 + 100*i, m_profiles[i].m_nbAvgTime);
|
||||
// Noise reduction
|
||||
s.writeBool (130 + 100*i, m_profiles[i].m_dnr);
|
||||
s.writeBool (132 + 100*i, m_profiles[i].m_anf);
|
||||
s.writeS32 (133 + 100*i, (int) m_profiles[i].m_nrScheme);
|
||||
s.writeS32 (134 + 100*i, (int) m_profiles[i].m_nr2Gain);
|
||||
s.writeS32 (135 + 100*i, (int) m_profiles[i].m_nr2NPE);
|
||||
s.writeS32 (136 + 100*i, (int) m_profiles[i].m_nrPosition);
|
||||
s.writeBool (137 + 100*i, m_profiles[i].m_nr2ArtifactReduction);
|
||||
// Demods
|
||||
s.writeBool (140 + 100*i, m_profiles[i].m_amFadeLevel);
|
||||
s.writeBool (141 + 100*i, m_profiles[i].m_cwPeaking);
|
||||
s.writeDouble(142 + 100*i, m_profiles[i].m_cwPeakFrequency);
|
||||
s.writeDouble(143 + 100*i, m_profiles[i].m_cwBandwidth);
|
||||
s.writeDouble(144 + 100*i, m_profiles[i].m_cwGain);
|
||||
s.writeDouble(145 + 100*i, m_profiles[i].m_fmDeviation);
|
||||
s.writeDouble(146 + 100*i, m_profiles[i].m_fmAFLow);
|
||||
s.writeDouble(147 + 100*i, m_profiles[i].m_fmAFHigh);
|
||||
s.writeBool( 148 + 100*i, m_profiles[i].m_fmAFLimiter);
|
||||
s.writeDouble(149 + 100*i, m_profiles[i].m_fmAFLimiterGain);
|
||||
s.writeBool( 150 + 100*i, m_profiles[i].m_fmCTCSSNotch);
|
||||
s.writeDouble(151 + 100*i, m_profiles[i].m_fmCTCSSNotchFrequency);
|
||||
// Squelch
|
||||
s.writeBool( 160 + 100*i, m_profiles[i].m_squelch);
|
||||
s.writeS32( 161 + 100*i, m_profiles[i].m_squelchThreshold);
|
||||
s.writeDouble(162 + 100*i, m_profiles[i].m_ssqlTauMute);
|
||||
s.writeDouble(163 + 100*i, m_profiles[i].m_ssqlTauUnmute);
|
||||
s.writeDouble(164 + 100*i, m_profiles[i].m_amsqMaxTail);
|
||||
}
|
||||
|
||||
return s.final();
|
||||
}
|
||||
|
||||
bool WDSPRxSettings::deserialize(const QByteArray& data)
|
||||
{
|
||||
SimpleDeserializer d(data);
|
||||
|
||||
if(!d.isValid())
|
||||
{
|
||||
resetToDefaults();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(d.getVersion() == 1)
|
||||
{
|
||||
QByteArray bytetmp;
|
||||
qint32 tmp;
|
||||
uint32_t utmp;
|
||||
QString strtmp;
|
||||
|
||||
d.readS32( 1, &m_inputFrequencyOffset, 0);
|
||||
d.readS32( 2, &tmp, 0);
|
||||
m_demod = (WDSPRxProfile::WDSPRxDemod) tmp;
|
||||
d.readS32( 3, &tmp, 30);
|
||||
m_volume = tmp / 10.0;
|
||||
|
||||
if (m_spectrumGUI)
|
||||
{
|
||||
d.readBlob(4, &bytetmp);
|
||||
m_spectrumGUI->deserialize(bytetmp);
|
||||
}
|
||||
|
||||
d.readU32( 5, &m_rgbColor);
|
||||
d.readBool( 8, &m_audioBinaural, false);
|
||||
d.readBool( 9, &m_audioFlipChannels, false);
|
||||
d.readBool( 10, &m_dsb, false);
|
||||
// AGC
|
||||
d.readBool( 11, &m_agc, true);
|
||||
d.readS32( 12, &tmp, 2);
|
||||
m_agcMode = (WDSPRxProfile::WDSPRxAGCMode) tmp;
|
||||
d.readS32( 13, &m_agcGain, 80);
|
||||
d.readS32( 14, &m_agcSlope, 35);
|
||||
d.readS32( 15, &m_agcHangThreshold, 0);
|
||||
// Noise blanker
|
||||
d.readBool( 20, &m_dnb, false);
|
||||
d.readS32( 21, &tmp, 2);
|
||||
m_nbScheme = (WDSPRxProfile::WDSPRxNBScheme) tmp;
|
||||
d.readS32( 22, &tmp, 2);
|
||||
m_nb2Mode = (WDSPRxProfile::WDSPRxNB2Mode) tmp;
|
||||
d.readDouble(23, &m_nbSlewTime, 0.1);
|
||||
d.readDouble(24, &m_nbLeadTime, 0.1);
|
||||
d.readDouble(25, &m_nbLagTime, 0.1);
|
||||
d.readS32( 26, &m_nbThreshold, 30);
|
||||
d.readDouble(27, &m_nbAvgTime, 50.0);
|
||||
// Nosie reduction
|
||||
d.readBool( 30, &m_dnr, false);
|
||||
d.readBool( 32, &m_anf, false);
|
||||
d.readS32( 33, &tmp, 2);
|
||||
m_nrScheme = (WDSPRxProfile::WDSPRxNRScheme) tmp;
|
||||
d.readS32( 34, &tmp, 2);
|
||||
m_nr2Gain = (WDSPRxProfile::WDSPRxNR2Gain) tmp;
|
||||
d.readS32( 35, &tmp, 2);
|
||||
m_nr2NPE = (WDSPRxProfile::WDSPRxNR2NPE) tmp;
|
||||
d.readS32( 36, &tmp, 2);
|
||||
m_nrPosition = (WDSPRxProfile::WDSPRxNRPosition) tmp;
|
||||
d.readBool( 37, &m_nr2ArtifactReduction, true);
|
||||
// Demods
|
||||
d.readBool( 40, &m_amFadeLevel, false);
|
||||
d.readBool( 41, &m_cwPeaking, false);
|
||||
d.readDouble(42, &m_cwPeakFrequency, 600.0);
|
||||
d.readDouble(43, &m_cwBandwidth, 100.0);
|
||||
d.readDouble(44, &m_cwGain, 2.0);
|
||||
d.readDouble(45, &m_fmDeviation, 2500.0);
|
||||
d.readDouble(46, &m_fmAFLow, 300.0);
|
||||
d.readDouble(47, &m_fmAFHigh, 3000.0);
|
||||
d.readBool( 48, &m_fmAFLimiter, false);
|
||||
d.readDouble(49, &m_fmAFLimiterGain, 10.0);
|
||||
d.readBool( 50, &m_fmCTCSSNotch, false);
|
||||
d.readDouble(51, &m_fmCTCSSNotchFrequency, 67.0);
|
||||
// Squelch
|
||||
d.readBool( 60, &m_squelch, false);
|
||||
d.readS32( 61, &m_squelchThreshold, 3);
|
||||
d.readDouble(62, &m_ssqlTauMute, 0.1);
|
||||
d.readDouble(63, &m_ssqlTauUnmute, 0.1);
|
||||
d.readDouble(64, &m_amsqMaxTail, 1.5);
|
||||
//
|
||||
d.readString(70, &m_title, "WDSP Receiver");
|
||||
d.readString(71, &m_audioDeviceName, AudioDeviceManager::m_defaultDeviceName);
|
||||
d.readBool( 72, &m_useReverseAPI, false);
|
||||
d.readString(73, &m_reverseAPIAddress, "127.0.0.1");
|
||||
d.readU32( 74, &utmp, 0);
|
||||
|
||||
if ((utmp > 1023) && (utmp < 65535)) {
|
||||
m_reverseAPIPort = utmp;
|
||||
} else {
|
||||
m_reverseAPIPort = 8888;
|
||||
}
|
||||
|
||||
d.readU32( 75, &utmp, 0);
|
||||
m_reverseAPIDeviceIndex = utmp > 99 ? 99 : utmp;
|
||||
d.readU32( 76, &utmp, 0);
|
||||
m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp;
|
||||
d.readS32( 77, &m_streamIndex, 0);
|
||||
|
||||
if (m_rollupState)
|
||||
{
|
||||
d.readBlob(78, &bytetmp);
|
||||
m_rollupState->deserialize(bytetmp);
|
||||
}
|
||||
|
||||
d.readS32( 79, &m_workspaceIndex, 0);
|
||||
d.readBlob( 80, &m_geometryBytes);
|
||||
d.readBool( 81, &m_hidden, false);
|
||||
d.readU32( 82, &utmp, 0);
|
||||
m_profileIndex = utmp < 10 ? utmp : 0;
|
||||
|
||||
for (unsigned int i = 0; (i < 10); i++)
|
||||
{
|
||||
d.readS32 (104 + 100*i, &tmp, 9);
|
||||
m_profiles[i].m_demod = (WDSPRxProfile::WDSPRxDemod) tmp;
|
||||
// Filter
|
||||
d.readS32 (100 + 100*i, &m_profiles[i].m_spanLog2, 3);
|
||||
d.readS32 (101 + 100*i, &tmp, 30);
|
||||
m_profiles[i].m_highCutoff = tmp * 100.0;
|
||||
d.readS32 (102 + 100*i, &tmp, 3);
|
||||
m_profiles[i].m_lowCutoff = tmp * 100.0;
|
||||
d.readS32 (103 + 100*i, &m_profiles[i].m_fftWindow, 0);
|
||||
// AGC
|
||||
d.readBool( 110 + 100*i, &m_profiles[i].m_agc, true);
|
||||
d.readS32( 111 + 100*i, &tmp, 2);
|
||||
m_profiles[i].m_agcMode = (WDSPRxProfile::WDSPRxAGCMode) tmp;
|
||||
d.readS32( 112 + 100*i, &m_profiles[i].m_agcGain, 80);
|
||||
d.readS32( 113 + 100*i, &m_profiles[i].m_agcSlope, 35);
|
||||
d.readS32( 114 + 100*i, &m_profiles[i].m_agcHangThreshold, 0);
|
||||
// Noise blanker
|
||||
d.readBool (120 + 100*i, &m_profiles[i].m_dnb, false);
|
||||
d.readS32 (121 + 100*i, &tmp);
|
||||
m_profiles[i].m_nbScheme = (WDSPRxProfile::WDSPRxNBScheme) tmp;
|
||||
d.readS32 (122 + 100*i, &tmp);
|
||||
m_profiles[i].m_nb2Mode = (WDSPRxProfile::WDSPRxNB2Mode) tmp;
|
||||
d.readDouble(123 + 100*i, &m_profiles[i].m_nbSlewTime, 0.1);
|
||||
d.readDouble(124 + 100*i, &m_profiles[i].m_nbLeadTime, 0.1);
|
||||
d.readDouble(125 + 100*i, &m_profiles[i].m_nbLagTime, 0.1);
|
||||
d.readS32 (126 + 100*i, &m_profiles[i].m_nbThreshold, 30);
|
||||
d.readDouble(127 + 100*i, &m_profiles[i].m_nbAvgTime, 50.0);
|
||||
// Noise reduction
|
||||
d.readBool (130 + 100*i, &m_profiles[i].m_dnr, false);
|
||||
d.readBool (132 + 100*i, &m_profiles[i].m_anf, false);
|
||||
d.readS32 (133 + 100*i, &tmp);
|
||||
m_profiles[i].m_nrScheme = (WDSPRxProfile::WDSPRxNRScheme) tmp;
|
||||
d.readS32 (134 + 100*i, &tmp);
|
||||
m_profiles[i].m_nr2Gain = (WDSPRxProfile::WDSPRxNR2Gain) tmp;
|
||||
d.readS32 (135 + 100*i, &tmp);
|
||||
m_profiles[i].m_nr2NPE = (WDSPRxProfile::WDSPRxNR2NPE) tmp;
|
||||
d.readS32 (136 + 100*i, &tmp);
|
||||
m_profiles[i].m_nrPosition = (WDSPRxProfile::WDSPRxNRPosition) tmp;
|
||||
d.readBool (137 + 100*i, &m_profiles[i].m_nr2ArtifactReduction);
|
||||
// Demods
|
||||
d.readBool (140 + 100*i, &m_amFadeLevel, false);
|
||||
d.readBool (141 + 100*i, &m_cwPeaking, false);
|
||||
d.readDouble(142 + 100*i, &m_profiles[i].m_cwPeakFrequency, 600.0);
|
||||
d.readDouble(143 + 100*i, &m_profiles[i].m_cwBandwidth, 100.0);
|
||||
d.readDouble(144 + 100*i, &m_profiles[i].m_cwGain, 2.0);
|
||||
d.readDouble(145 + 100*i, &m_profiles[i].m_fmDeviation, 2500.0);
|
||||
d.readDouble(146 + 100*i, &m_profiles[i].m_fmAFLow, 300.0);
|
||||
d.readDouble(147 + 100*i, &m_profiles[i].m_fmAFHigh, 3000.0);
|
||||
d.readBool( 148 + 100*i, &m_profiles[i].m_fmAFLimiter, false);
|
||||
d.readDouble(149 + 100*i, &m_profiles[i].m_fmAFLimiterGain, 10.0);
|
||||
d.readBool( 150 + 100*i, &m_profiles[i].m_fmCTCSSNotch, false);
|
||||
d.readDouble(151 + 100*i, &m_profiles[i].m_fmCTCSSNotchFrequency, 67.0);
|
||||
// Squelch
|
||||
d.readBool( 160 + 100*i, &m_profiles[i].m_squelch, false);
|
||||
d.readS32( 161 + 100*i, &m_profiles[i].m_squelchThreshold, 3);
|
||||
d.readDouble(161 + 100*i, &m_profiles[i].m_ssqlTauMute, 0.1);
|
||||
d.readDouble(162 + 100*i, &m_profiles[i].m_ssqlTauUnmute, 0.1);
|
||||
d.readDouble(163 + 100*i, &m_profiles[i].m_amsqMaxTail, 1.5);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
resetToDefaults();
|
||||
return false;
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
--- plugins/channelrx/wdsprx/wdsprxsettings.cpp
|
||||
+++ plugins/channelrx/wdsprx/wdsprxsettings.cpp
|
||||
@@ -182,6 +184,7 @@ QByteArray WDSPRxSettings::serialize() const
|
||||
s.writeDouble(127 + 50*i, m_profiles[i].m_nbAvgTime);
|
||||
// Noise reduction
|
||||
s.writeBool (130 + 50*i, m_profiles[i].m_dnr);
|
||||
+ s.writeBool (131 + 50*i, m_profiles[i].m_snb);
|
||||
s.writeBool (132 + 50*i, m_profiles[i].m_anf);
|
||||
s.writeS32 (133 + 50*i, (int) m_profiles[i].m_nrScheme);
|
||||
s.writeS32 (134 + 50*i, (int) m_profiles[i].m_nr2Gain);
|
||||
@@ -329,6 +333,7 @@ bool WDSPRxSettings::deserialize(const QByteArray& data)
|
||||
d.readDouble(127 + 50*i, &m_profiles[i].m_nbAvgTime, 50.0);
|
||||
// Noise reduction
|
||||
d.readBool (130 + 50*i, &m_profiles[i].m_dnr, false);
|
||||
+ d.readBool (131 + 50*i, &m_profiles[i].m_snb, false);
|
||||
d.readBool (132 + 50*i, &m_profiles[i].m_anf, false);
|
||||
d.readS32 (133 + 50*i, &tmp);
|
||||
m_profiles[i].m_nrScheme = (WDSPRxProfile::WDSPRxNRScheme) tmp;
|
@ -18,6 +18,8 @@
|
||||
#ifndef PLUGINS_CHANNELRX_WDSPRX_WDSPRXSETTINGS_H_
|
||||
#define PLUGINS_CHANNELRX_WDSPRX_WDSPRXSETTINGS_H_
|
||||
|
||||
#include <array>
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QString>
|
||||
|
||||
@ -133,6 +135,10 @@ struct WDSPRxProfile
|
||||
double m_ssqlTauMute; //!< Voice squelch tau mute
|
||||
double m_ssqlTauUnmute; //!< Voice squelch tau unmute
|
||||
double m_amsqMaxTail;
|
||||
// Equalizer
|
||||
bool m_equalizer;
|
||||
std::array<float, 11> m_eqF; //!< Frequencies vector. Index 0 is always 0 as this is the preamp position
|
||||
std::array<float, 11> m_eqG; //!< Gains vector (dB). Index 0 is the preamp (common) gain
|
||||
|
||||
WDSPRxProfile() :
|
||||
m_demod(DemodSSB),
|
||||
@ -169,8 +175,8 @@ struct WDSPRxProfile
|
||||
m_fmDeviation(2500.0),
|
||||
m_fmAFLow(300.0),
|
||||
m_fmAFHigh(3000.0),
|
||||
m_fmAFLimiter(false),
|
||||
m_fmAFLimiterGain(10.0),
|
||||
m_fmAFLimiter(true),
|
||||
m_fmAFLimiterGain(-40.0),
|
||||
m_fmCTCSSNotch(false),
|
||||
m_fmCTCSSNotchFrequency(67.0),
|
||||
m_squelch(false),
|
||||
@ -178,7 +184,10 @@ struct WDSPRxProfile
|
||||
m_squelchMode(SquelchModeVoice),
|
||||
m_ssqlTauMute(0.1),
|
||||
m_ssqlTauUnmute(0.1),
|
||||
m_amsqMaxTail(1.5)
|
||||
m_amsqMaxTail(1.5),
|
||||
m_equalizer(false),
|
||||
m_eqF{0.0, 32.0, 63.0, 125.0, 250.0, 500.0, 1000.0, 2000.0, 4000.0, 8000.0, 16000.0},
|
||||
m_eqG{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
|
||||
{}
|
||||
};
|
||||
|
||||
@ -238,6 +247,10 @@ struct WDSPRxSettings
|
||||
double m_ssqlTauMute; //!< Voice squelch tau mute
|
||||
double m_ssqlTauUnmute; //!< Voice squelch tau unmute
|
||||
double m_amsqMaxTail;
|
||||
// Equalizer
|
||||
bool m_equalizer;
|
||||
std::array<float, 11> m_eqF = {0.0, 32.0, 63.0, 125.0, 250.0, 500.0, 1000.0, 2000.0, 4000.0, 8000.0, 16000.0}; //!< Frequencies vector. Index 0 is always 0 as this is the preamp position
|
||||
std::array<float, 11> m_eqG = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; //!< Gains vector (dB). Index 0 is the preamp (common) gain
|
||||
|
||||
quint32 m_rgbColor;
|
||||
QString m_title;
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "ssql.hpp"
|
||||
#include "amsq.hpp"
|
||||
#include "fmsq.hpp"
|
||||
#include "eq.hpp"
|
||||
|
||||
#include "wdsprxsink.h"
|
||||
|
||||
@ -716,6 +717,18 @@ void WDSPRxSink::applySettings(const WDSPRxSettings& settings, bool force)
|
||||
WDSP::AMSQ::SetAMSQMaxTail(*m_rxa, settings.m_amsqMaxTail);
|
||||
}
|
||||
|
||||
// Equalizer
|
||||
|
||||
if ((m_settings.m_equalizer != settings.m_equalizer) || force) {
|
||||
WDSP::EQP::SetEQRun(*m_rxa, settings.m_equalizer ? 1 : 0);
|
||||
}
|
||||
|
||||
if ((m_settings.m_eqF != settings.m_eqF)
|
||||
|| (m_settings.m_eqG != settings.m_eqG) || force)
|
||||
{
|
||||
WDSP::EQP::SetEQProfile(*m_rxa, 10, settings.m_eqF.data(), settings.m_eqG.data());
|
||||
}
|
||||
|
||||
// Audio panel
|
||||
|
||||
if ((m_settings.m_volume != settings.m_volume) || force) {
|
||||
|
@ -28,6 +28,7 @@ const QStringList MorseDecoderSettings::m_channelURIs = {
|
||||
QStringLiteral("sdrangel.channel.nfmdemod"),
|
||||
QStringLiteral("sdrangel.channel.ssbdemod"),
|
||||
QStringLiteral("sdrangel.channel.wfmdemod"),
|
||||
QStringLiteral("sdrangel.channel.wdsprx"),
|
||||
};
|
||||
|
||||
MorseDecoderSettings::MorseDecoderSettings() :
|
||||
|
@ -294,7 +294,7 @@ void EQP::SetEQMP (RXA& rxa, int mp)
|
||||
}
|
||||
}
|
||||
|
||||
void EQP::SetEQProfile (RXA& rxa, int nfreqs, float* F, float* G)
|
||||
void EQP::SetEQProfile (RXA& rxa, int nfreqs, const float* F, const float* G)
|
||||
{
|
||||
EQP *a;
|
||||
float* impulse;
|
||||
@ -429,7 +429,7 @@ void EQP::SetEQMP (TXA& txa, int mp)
|
||||
}
|
||||
}
|
||||
|
||||
void EQP::SetEQProfile (TXA& txa, int nfreqs, float* F, float* G)
|
||||
void EQP::SetEQProfile (TXA& txa, int nfreqs, const float* F, const float* G)
|
||||
{
|
||||
EQP *a;
|
||||
float* impulse;
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
static void SetEQRun (RXA& rxa, int run);
|
||||
static void SetEQNC (RXA& rxa, int nc);
|
||||
static void SetEQMP (RXA& rxa, int mp);
|
||||
static void SetEQProfile (RXA& rxa, int nfreqs, float* F, float* G);
|
||||
static void SetEQProfile (RXA& rxa, int nfreqs, const float* F, const float* G);
|
||||
static void SetEQCtfmode (RXA& rxa, int mode);
|
||||
static void SetEQWintype (RXA& rxa, int wintype);
|
||||
static void SetGrphEQ (RXA& rxa, int *rxeq);
|
||||
@ -93,7 +93,7 @@ public:
|
||||
static void SetEQRun (TXA& txa, int run);
|
||||
static void SetEQNC (TXA& txa, int nc);
|
||||
static void SetEQMP (TXA& txa, int mp);
|
||||
static void SetEQProfile (TXA& txa, int nfreqs, float* F, float* G);
|
||||
static void SetEQProfile (TXA& txa, int nfreqs, const float* F, const float* G);
|
||||
static void SetEQCtfmode (TXA& txa, int mode);
|
||||
static void SetEQWintype (TXA& txa, int wintype);
|
||||
static void SetGrphEQ (TXA& txa, int *txeq);
|
||||
|
@ -134,8 +134,8 @@ FMD* FMD::create_fmd(
|
||||
a->nc_aud = nc_aud;
|
||||
a->mp_aud = mp_aud;
|
||||
a->lim_run = 0;
|
||||
a->lim_pre_gain = 0.4;
|
||||
a->lim_gain = 2.5;
|
||||
a->lim_pre_gain = 0.01; // 0.4
|
||||
a->lim_gain = 0.0001; // 2.5
|
||||
calc_fmd (a);
|
||||
// de-emphasis filter
|
||||
a->audio = new float[a->size * 2]; // (float *) malloc0 (a->size * sizeof (complex));
|
||||
|
Loading…
Reference in New Issue
Block a user