mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-29 13:32:26 -04:00
UDPSink plugin: rename volume to gain
This commit is contained in:
parent
c601d8dbaa
commit
90ce3ec9ad
@ -15,16 +15,16 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "../../channelrx/udpsrc/udpsrcplugin.h"
|
#include "udpsrcplugin.h"
|
||||||
|
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
|
|
||||||
#include "../../channelrx/udpsrc/udpsrcgui.h"
|
#include "udpsrcgui.h"
|
||||||
|
|
||||||
const PluginDescriptor UDPSrcPlugin::m_pluginDescriptor = {
|
const PluginDescriptor UDPSrcPlugin::m_pluginDescriptor = {
|
||||||
QString("UDP Channel Source"),
|
QString("UDP Channel Source"),
|
||||||
QString("3.5.0"),
|
QString("3.6.0"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
|
@ -457,7 +457,7 @@ void UDPSinkGUI::on_udpPort_textEdited(const QString& arg1 __attribute__((unused
|
|||||||
ui->applyBtn->setEnabled(true);
|
ui->applyBtn->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPSinkGUI::on_volume_valueChanged(int value)
|
void UDPSinkGUI::on_gain_valueChanged(int value)
|
||||||
{
|
{
|
||||||
ui->gainText->setText(tr("%1").arg(value/10.0, 0, 'f', 1));
|
ui->gainText->setText(tr("%1").arg(value/10.0, 0, 'f', 1));
|
||||||
applySettings();
|
applySettings();
|
||||||
|
@ -67,7 +67,7 @@ private slots:
|
|||||||
void on_applyBtn_clicked();
|
void on_applyBtn_clicked();
|
||||||
void onWidgetRolled(QWidget* widget, bool rollDown);
|
void onWidgetRolled(QWidget* widget, bool rollDown);
|
||||||
void onMenuDoubleClicked();
|
void onMenuDoubleClicked();
|
||||||
void on_volume_valueChanged(int value);
|
void on_gain_valueChanged(int value);
|
||||||
void on_squelch_valueChanged(int value);
|
void on_squelch_valueChanged(int value);
|
||||||
void on_channelMute_toggled(bool checked);
|
void on_channelMute_toggled(bool checked);
|
||||||
void tick();
|
void tick();
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="LevelMeterVU" name="volumeMeter" native="true">
|
<widget class="LevelMeterVU" name="volumeMeter" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@ -644,6 +644,12 @@
|
|||||||
<layout class="QHBoxLayout" name="GainLayout">
|
<layout class="QHBoxLayout" name="GainLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="gainLabel">
|
<widget class="QLabel" name="gainLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>22</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Gain</string>
|
<string>Gain</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -21,7 +21,8 @@ double CalcDb::dbPower(double magsq, double floordB)
|
|||||||
{
|
{
|
||||||
if (magsq > 0)
|
if (magsq > 0)
|
||||||
{
|
{
|
||||||
return 10.0 * log10(magsq);
|
double val = 10.0 * log10(magsq);
|
||||||
|
return val > floordB ? val : floordB;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user